Class: Asynchronic::Error
- Inherits:
-
Object
- Object
- Asynchronic::Error
- Defined in:
- lib/asynchronic/error.rb
Instance Attribute Summary collapse
-
#backtrace ⇒ Object
readonly
Returns the value of attribute backtrace.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(source) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(source) ⇒ Error
Returns a new instance of Error.
7 8 9 10 |
# File 'lib/asynchronic/error.rb', line 7 def initialize(source) @message = source.respond_to?(:message) ? source. : source.to_s @backtrace = source.respond_to?(:backtrace) ? source.backtrace : [] end |
Instance Attribute Details
#backtrace ⇒ Object (readonly)
Returns the value of attribute backtrace.
5 6 7 |
# File 'lib/asynchronic/error.rb', line 5 def backtrace @backtrace end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
4 5 6 |
# File 'lib/asynchronic/error.rb', line 4 def @message end |