Exception: Mws::Errors::ServerError
- Defined in:
- lib/mws/errors.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(options) ⇒ ServerError
constructor
A new instance of ServerError.
Constructor Details
#initialize(options) ⇒ ServerError
Returns a new instance of ServerError.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/mws/errors.rb', line 11 def initialize() @type = [:type] || 'HTTP' @code = [:code] @message = [:message] @details = [:details] || [:detail] if @details.nil? or @details.empty? @details = 'None' end super "Type: #{@type}, Code: #{@code}, Message: #{@message}, Details: #{@details}" end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
9 10 11 |
# File 'lib/mws/errors.rb', line 9 def code @code end |
#details ⇒ Object (readonly)
Returns the value of attribute details.
9 10 11 |
# File 'lib/mws/errors.rb', line 9 def details @details end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
9 10 11 |
# File 'lib/mws/errors.rb', line 9 def @message end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
9 10 11 |
# File 'lib/mws/errors.rb', line 9 def type @type end |