Class: Ruote::ErrorHandler::RaisedError

Inherits:
Object
  • Object
show all
Defined in:
lib/ruote/svc/error_handler.rb

Overview

The ‘raise’ action/msg passes deflated errors. This wrapper class “inflates” them.

Instance Method Summary collapse

Constructor Details

#initialize(h) ⇒ RaisedError

Returns a new instance of RaisedError.



172
173
174
# File 'lib/ruote/svc/error_handler.rb', line 172

def initialize(h)
  @h = h
end

Instance Method Details

#backtraceObject



181
182
183
# File 'lib/ruote/svc/error_handler.rb', line 181

def backtrace
  @h['trace']
end

#classObject



175
176
177
# File 'lib/ruote/svc/error_handler.rb', line 175

def class
  Ruote.constantize(@h['class'])
end

#messageObject



178
179
180
# File 'lib/ruote/svc/error_handler.rb', line 178

def message
  @h['message']
end

#to_sObject Also known as: inspect



184
185
186
# File 'lib/ruote/svc/error_handler.rb', line 184

def to_s
  "raised: #{@h['class']}: #{@h['message']}"
end