Exception: MTProto::RpcError

Inherits:
Error
  • Object
show all
Defined in:
lib/mtproto/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error_code, error_message) ⇒ RpcError

Returns a new instance of RpcError.



21
22
23
24
25
# File 'lib/mtproto/errors.rb', line 21

def initialize(error_code, error_message)
  @error_code = error_code
  @error_message = error_message
  super("RPC Error #{error_code}: #{error_message}")
end

Instance Attribute Details

#error_codeObject (readonly)

Returns the value of attribute error_code.



19
20
21
# File 'lib/mtproto/errors.rb', line 19

def error_code
  @error_code
end

#error_messageObject (readonly)

Returns the value of attribute error_message.



19
20
21
# File 'lib/mtproto/errors.rb', line 19

def error_message
  @error_message
end