Exception: SObjectModel::Rest::RequestError
- Inherits:
-
StandardError
- Object
- StandardError
- SObjectModel::Rest::RequestError
- Defined in:
- lib/sobject_model/rest/errors.rb
Instance Attribute Summary collapse
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#error_message ⇒ Object
readonly
Returns the value of attribute error_message.
Instance Method Summary collapse
-
#initialize(code, msg) ⇒ RequestError
constructor
A new instance of RequestError.
- #to_s ⇒ Object
Constructor Details
#initialize(code, msg) ⇒ RequestError
Returns a new instance of RequestError.
8 9 10 11 12 |
# File 'lib/sobject_model/rest/errors.rb', line 8 def initialize(code, msg) @error_code = code @error_message = msg super(to_s) end |
Instance Attribute Details
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
7 8 9 |
# File 'lib/sobject_model/rest/errors.rb', line 7 def error_code @error_code end |
#error_message ⇒ Object (readonly)
Returns the value of attribute error_message.
7 8 9 |
# File 'lib/sobject_model/rest/errors.rb', line 7 def @error_message end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/sobject_model/rest/errors.rb', line 14 def to_s %|[#{@error_code}] #{@error_message}| end |