Class: Parallel::ExceptionWrapper

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(exception) ⇒ ExceptionWrapper

Returns a new instance of ExceptionWrapper.



11
12
13
14
15
16
17
18
# File 'lib/parallel.rb', line 11

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

#exceptionObject (readonly)

Returns the value of attribute exception.



10
11
12
# File 'lib/parallel.rb', line 10

def exception
  @exception
end