Exception: Exception
- Defined in:
- lib/hoth/extension/core/exception.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.json_create(hash) ⇒ Object
14 15 16 17 18 |
# File 'lib/hoth/extension/core/exception.rb', line 14 def self.json_create(hash) exception = new(hash["message"]) exception.set_backtrace hash['backtrace'] exception end |
Instance Method Details
#as_json(*params) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/hoth/extension/core/exception.rb', line 6 def as_json(*params) { 'json_class' => self.class.name, 'message' => self., 'backtrace' => self.backtrace } end |
#to_json(*params) ⇒ Object
2 3 4 |
# File 'lib/hoth/extension/core/exception.rb', line 2 def to_json(*params) as_json(*params).to_json(*params) end |