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.
23 24 25 26 27 28 29 30 |
# File 'lib/parallel.rb', line 23 def initialize(exception) dumpable = Marshal.dump(exception) rescue nil unless dumpable exception = RuntimeError.new("Undumpable Exception -- #{exception.inspect}") end @exception = exception end |
Instance Attribute Details
#exception ⇒ Object (readonly)
Returns the value of attribute exception.
22 23 24 |
# File 'lib/parallel.rb', line 22 def exception @exception end |