Class: Parallel::ExceptionWrapper
- Inherits:
-
Object
- Object
- Parallel::ExceptionWrapper
- Defined in:
- lib/parallel.rb
Instance Attribute Summary collapse
-
#exception ⇒ Object
readonly
Returns the value of attribute exception.
Instance Method Summary collapse
-
#initialize(exception) ⇒ ExceptionWrapper
constructor
A new instance of ExceptionWrapper.
Constructor Details
#initialize(exception) ⇒ ExceptionWrapper
Returns a new instance of ExceptionWrapper.
46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/parallel.rb', line 46 def initialize(exception) # Remove the bindings stack added by the better_errors gem, # because it cannot be marshalled if exception.instance_variable_defined? :@__better_errors_bindings_stack exception.send :remove_instance_variable, :@__better_errors_bindings_stack end @exception = begin Marshal.dump(exception) && exception rescue StandardError UndumpableException.new(exception) end end |
Instance Attribute Details
#exception ⇒ Object (readonly)
Returns the value of attribute exception.
44 45 46 |
# File 'lib/parallel.rb', line 44 def exception @exception end |