Exception: Twilio::REST::TwilioError
- Inherits:
-
StandardError
- Object
- StandardError
- Twilio::REST::TwilioError
- Defined in:
- lib/twilio-ruby/framework/error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(message, body = nil) ⇒ TwilioError
constructor
A new instance of TwilioError.
- #to_s ⇒ Object
Constructor Details
#initialize(message, body = nil) ⇒ TwilioError
Returns a new instance of TwilioError.
6 7 8 9 |
# File 'lib/twilio-ruby/framework/error.rb', line 6 def initialize(, body = nil) = @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
4 5 6 |
# File 'lib/twilio-ruby/framework/error.rb', line 4 def body @body end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
4 5 6 |
# File 'lib/twilio-ruby/framework/error.rb', line 4 def end |
Instance Method Details
#to_s ⇒ Object
11 12 13 |
# File 'lib/twilio-ruby/framework/error.rb', line 11 def to_s "#{@message}: #{@body || 'no body'}" end |