Class: Nestene::ExecutionError
- Inherits:
-
Object
- Object
- Nestene::ExecutionError
- Includes:
- StructureMapper::Hash
- Defined in:
- lib/nestene/execution_error.rb
Instance Method Summary collapse
-
#initialize(exception = nil) ⇒ ExecutionError
constructor
A new instance of ExecutionError.
- #to_exception ⇒ Object
Constructor Details
#initialize(exception = nil) ⇒ ExecutionError
Returns a new instance of ExecutionError.
6 7 8 9 10 11 12 13 |
# File 'lib/nestene/execution_error.rb', line 6 def initialize(exception = nil) if exception self. = exception. self.type = exception.class.name self.backtrace = exception.backtrace end end |
Instance Method Details
#to_exception ⇒ Object
20 21 22 23 24 |
# File 'lib/nestene/execution_error.rb', line 20 def to_exception exception = Nestene.class_from_string(type).new() exception.set_backtrace self.backtrace exception end |