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


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

def initialize(h)
  @h = h
end

Instance Method Details

#atObject


186
187
188
# File 'lib/ruote/svc/error_handler.rb', line 186

def at
  @h['at']
end

#backtraceObject


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

def backtrace
  @h['trace']
end

#classObject


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

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

#messageObject


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

def message
  @h['message']
end

#ruote_detailsObject


189
190
191
# File 'lib/ruote/svc/error_handler.rb', line 189

def ruote_details
  @h['details']
end

#to_sObject Also known as: inspect


192
193
194
# File 'lib/ruote/svc/error_handler.rb', line 192

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