Exception: DiscourseApi::Error
- Inherits:
-
DiscourseError
- Object
- StandardError
- DiscourseError
- DiscourseApi::Error
- Defined in:
- lib/discourse_api/error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#wrapped_exception ⇒ Object
readonly
Returns the value of attribute wrapped_exception.
Attributes inherited from DiscourseError
Instance Method Summary collapse
-
#initialize(exception = $!) ⇒ DiscourseApi::Error
constructor
Initializes a new Error object.
Constructor Details
#initialize(exception = $!) ⇒ DiscourseApi::Error
Initializes a new Error object
19 20 21 22 |
# File 'lib/discourse_api/error.rb', line 19 def initialize(exception = $!) @wrapped_exception = exception exception.respond_to?(:message) ? super(exception.) : super(exception.to_s) end |
Instance Attribute Details
#wrapped_exception ⇒ Object (readonly)
Returns the value of attribute wrapped_exception.
13 14 15 |
# File 'lib/discourse_api/error.rb', line 13 def wrapped_exception @wrapped_exception end |