Exception: RequestaError::CustomError
- Inherits:
-
StandardError
- Object
- StandardError
- RequestaError::CustomError
- Defined in:
- lib/requesta/errors.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#foo ⇒ Object
readonly
Returns the value of attribute foo.
Instance Method Summary collapse
-
#initialize(message = "Default error message", foo = 'bar') ⇒ CustomError
constructor
A new instance of CustomError.
- #report ⇒ Object
Constructor Details
#initialize(message = "Default error message", foo = 'bar') ⇒ CustomError
Returns a new instance of CustomError.
12 13 14 15 |
# File 'lib/requesta/errors.rb', line 12 def initialize(="Default error message", foo='bar') @foo = foo super() end |
Instance Attribute Details
#foo ⇒ Object (readonly)
Returns the value of attribute foo.
10 11 12 |
# File 'lib/requesta/errors.rb', line 10 def foo @foo end |
Instance Method Details
#report ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/requesta/errors.rb', line 17 def report "\n\n" + self.class.to_s + ":\s" + self. + "\n\n" + self.backtrace.join("\n") + "\n\n" end |