Exception: Magento::ApiError
- Inherits:
-
StandardError
- Object
- StandardError
- Magento::ApiError
- Defined in:
- lib/magento/api_error.rb
Instance Attribute Summary collapse
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#original_exception ⇒ Object
readonly
Returns the value of attribute original_exception.
Instance Method Summary collapse
-
#initialize(message, error_code = nil, original_exception = nil) ⇒ ApiError
constructor
A new instance of ApiError.
- #to_s ⇒ Object
Constructor Details
#initialize(message, error_code = nil, original_exception = nil) ⇒ ApiError
Returns a new instance of ApiError.
7 8 9 10 11 |
# File 'lib/magento/api_error.rb', line 7 def initialize(, error_code = nil, original_exception = nil) @message = @error_code = error_code @original_exception = original_exception end |
Instance Attribute Details
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
5 6 7 |
# File 'lib/magento/api_error.rb', line 5 def error_code @error_code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
5 6 7 |
# File 'lib/magento/api_error.rb', line 5 def @message end |
#original_exception ⇒ Object (readonly)
Returns the value of attribute original_exception.
5 6 7 |
# File 'lib/magento/api_error.rb', line 5 def original_exception @original_exception end |
Instance Method Details
#to_s ⇒ Object
13 14 15 |
# File 'lib/magento/api_error.rb', line 13 def to_s "#{} (error code: #{error_code})" end |