Class: Parallel::ExceptionWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/gpack/core/parallel.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(exception) ⇒ ExceptionWrapper

Returns a new instance of ExceptionWrapper.



124
125
126
127
128
129
130
131
# File 'lib/gpack/core/parallel.rb', line 124

def initialize(exception)
  @exception =
    begin
      Marshal.dump(exception) && exception
    rescue
      UndumpableException.new(exception)
    end
end

Instance Attribute Details

#exceptionObject (readonly)

Returns the value of attribute exception.



123
124
125
# File 'lib/gpack/core/parallel.rb', line 123

def exception
  @exception
end