Exception: Adama::Errors::BaseError
- Inherits:
-
StandardError
- Object
- StandardError
- Adama::Errors::BaseError
- Defined in:
- lib/adama/errors.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#invoker ⇒ Object
readonly
Returns the value of attribute invoker.
Instance Method Summary collapse
-
#initialize(error:, command:, invoker: nil, backtrace: nil) ⇒ BaseError
constructor
A new instance of BaseError.
- #to_s ⇒ Object
Constructor Details
#initialize(error:, command:, invoker: nil, backtrace: nil) ⇒ BaseError
Returns a new instance of BaseError.
6 7 8 9 10 11 |
# File 'lib/adama/errors.rb', line 6 def initialize(error:, command:, invoker: nil, backtrace: nil) @error = error @command = command @invoker = invoker set_backtrace backtrace if backtrace end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
4 5 6 |
# File 'lib/adama/errors.rb', line 4 def command @command end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
4 5 6 |
# File 'lib/adama/errors.rb', line 4 def error @error end |
#invoker ⇒ Object (readonly)
Returns the value of attribute invoker.
4 5 6 |
# File 'lib/adama/errors.rb', line 4 def invoker @invoker end |
Instance Method Details
#to_s ⇒ Object
13 14 15 |
# File 'lib/adama/errors.rb', line 13 def to_s "#{command.class.name} failed with #{error.class}: #{error.}" end |