Exception: Dynflow::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/dynflow.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_hash(hash) ⇒ Object



39
40
41
# File 'lib/dynflow.rb', line 39

def self.from_hash(hash)
  self.new(hash[:message]).tap { |e| e.set_backtrace(hash[:backtrace]) }
end

Instance Method Details

#to_hashObject



35
36
37
# File 'lib/dynflow.rb', line 35

def to_hash
  { class: self.class.name, message: message, backtrace: backtrace }
end