class Nestene::ExecutionError

Public Class Methods

new(exception = nil) click to toggle source
# File lib/nestene/execution_error.rb, line 6
def initialize(exception = nil)

  if exception
    self.message = exception.message
    self.type = exception.class.name
    self.backtrace = exception.backtrace
  end
end

Public Instance Methods

to_exception() click to toggle source
# File lib/nestene/execution_error.rb, line 20
def to_exception
  exception = Nestene.class_from_string(type).new(message)
  exception.set_backtrace self.backtrace
  exception
end