Method: Hoss::Error::Exception.from_exception

Defined in:
lib/hoss/error/exception.rb

.from_exception(exception, **attrs) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


34
35
36
37
38
39
40
41
# File 'lib/hoss/error/exception.rb', line 34

def self.from_exception(exception, **attrs)
  new({
    message: exception.message.to_s,
    type: exception.class.to_s,
    module: format_module(exception),
    cause: exception.cause && Exception.from_exception(exception.cause)
  }.merge(attrs))
end