Exception: ZuoraAPI::Exceptions::ZuoraUnexpectedError
- Defined in:
- lib/zuora_api/exceptions.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#default_message ⇒ Object
writeonly
Sets the attribute default_message.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(message = nil, response = nil, errors = [], successes = [], *args) ⇒ ZuoraUnexpectedError
constructor
A new instance of ZuoraUnexpectedError.
- #to_s ⇒ Object
Methods inherited from Error
Constructor Details
#initialize(message = nil, response = nil, errors = [], successes = [], *args) ⇒ ZuoraUnexpectedError
Returns a new instance of ZuoraUnexpectedError.
181 182 183 184 185 186 |
# File 'lib/zuora_api/exceptions.rb', line 181 def initialize( = nil, response=nil, errors = [], successes = [], *args) @code = response.class.to_s == "HTTParty::Response" ? response.code : nil @message = () @response = response @default_message = "An unexpected error occurred" end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
178 179 180 |
# File 'lib/zuora_api/exceptions.rb', line 178 def code @code end |
#default_message=(value) ⇒ Object (writeonly)
Sets the attribute default_message
179 180 181 |
# File 'lib/zuora_api/exceptions.rb', line 179 def (value) @default_message = value end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
178 179 180 |
# File 'lib/zuora_api/exceptions.rb', line 178 def response @response end |
Instance Method Details
#to_s ⇒ Object
188 189 190 |
# File 'lib/zuora_api/exceptions.rb', line 188 def to_s @message || @default_message end |