Exception: ESM::Exception::ApplicationError
- Defined in:
- lib/esm/exception.rb
Overview
This exception allows attaching extra data to the exception This is mainly used for exception embeds
Direct Known Subclasses
CheckFailure, ExtensionError, InvalidArgument, MessageTooLarge, RequestTimeout, SendableError
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(data) ⇒ ApplicationError
constructor
A new instance of ApplicationError.
Constructor Details
#initialize(data) ⇒ ApplicationError
Returns a new instance of ApplicationError.
13 14 15 16 17 18 19 20 |
# File 'lib/esm/exception.rb', line 13 def initialize(data) # So if #message is called, it will return that. super(data.to_s) # Store the embed in the message # I had to do it this way because StandardError converts the message to a string @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
11 12 13 |
# File 'lib/esm/exception.rb', line 11 def data @data end |