Class: Cuprum::Errors::UncaughtException
- Inherits:
-
Cuprum::Error
- Object
- Cuprum::Error
- Cuprum::Errors::UncaughtException
- Defined in:
- lib/cuprum/errors/uncaught_exception.rb
Overview
Error returned when a command encounters an unhandled exception.
Constant Summary collapse
- TYPE =
Short string used to identify the type of error.
'cuprum.collections.errors.uncaught_exception'
Instance Attribute Summary collapse
-
#exception ⇒ StandardError
readonly
The exception that was raised.
Attributes inherited from Cuprum::Error
Instance Method Summary collapse
-
#initialize(exception:, message: 'uncaught exception') ⇒ UncaughtException
constructor
A new instance of UncaughtException.
Methods inherited from Cuprum::Error
Constructor Details
#initialize(exception:, message: 'uncaught exception') ⇒ UncaughtException
Returns a new instance of UncaughtException.
15 16 17 18 19 20 |
# File 'lib/cuprum/errors/uncaught_exception.rb', line 15 def initialize(exception:, message: 'uncaught exception') @exception = exception @cause = exception.cause super(message: ()) end |
Instance Attribute Details
#exception ⇒ StandardError (readonly)
Returns the exception that was raised.
23 24 25 |
# File 'lib/cuprum/errors/uncaught_exception.rb', line 23 def exception @exception end |