class SimpleFuture::ChildError

Exception class for the case where an uncaught exception is thrown in the child process.

Attributes

cause[R]

If the child process threw an exception, this is it. Otherwise, it's nil.

Public Class Methods

new(msg, cause = nil) click to toggle source

@param msg [String] The exception text. @param cause [Exception] If valid, the exception raised in the child

Calls superclass method
# File lib/simple-future.rb, line 52
def initialize(msg, cause = nil)
  super(msg)
  @cause = cause
end

Public Instance Methods

to_s() click to toggle source
Calls superclass method
# File lib/simple-future.rb, line 57
def to_s
  result = super.to_s
  result += " (cause: #{cause.class} '#{@cause.to_s}')" if @cause
  return result
end