Exception: PackAPI::InternalError
- Inherits:
-
StandardError
- Object
- StandardError
- PackAPI::InternalError
- Defined in:
- lib/pack_api/internal_error.rb
Overview
Error class for passing errors from the model to the API logic
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(msg = nil, object: nil, options: {}) ⇒ InternalError
constructor
A new instance of InternalError.
- #message ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(msg = nil, object: nil, options: {}) ⇒ InternalError
Returns a new instance of InternalError.
9 10 11 12 13 |
# File 'lib/pack_api/internal_error.rb', line 9 def initialize(msg = nil, object: nil, options: {}) super(msg) @object = object @options = end |
Instance Attribute Details
#object ⇒ Object (readonly)
Returns the value of attribute object.
7 8 9 |
# File 'lib/pack_api/internal_error.rb', line 7 def object @object end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/pack_api/internal_error.rb', line 7 def @options end |
Instance Method Details
#message ⇒ Object
15 16 17 |
# File 'lib/pack_api/internal_error.rb', line 15 def to_s end |
#to_s ⇒ Object
19 20 21 22 23 |
# File 'lib/pack_api/internal_error.rb', line 19 def to_s return super unless object.present? "#{super} - #{object.inspect}" end |