Exception: Heathen::StepError

Inherits:
Error
  • Object
show all
Defined in:
lib/heathen/errors.rb

Overview

Abstract step-wise error - the [#message] will also say in which method the error occurred (So could be supplied to the client application without confusing anybody)

Instance Method Summary collapse

Constructor Details

#initialize(method = nil) ⇒ StepError

Returns a new instance of StepError.


25
26
27
28
29
# File 'lib/heathen/errors.rb', line 25

def initialize method=nil
  calling_method = caller[2]
  method = calling_method.gsub(/.*[`](.*)'$/,'\\1')
  super "#{message} in step '#{method}'"
end