Class: Mutant::Result::Exception Private

Inherits:
Object
  • Object
show all
Defined in:
lib/mutant/result/exception.rb

Overview

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

Serializable exception data

Constant Summary collapse

CODEC =

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

Transform::Codec.for_anima(self)

Class Method Summary collapse

Class Method Details

.from_exception(exception) ⇒ Exception

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.

Build from a Ruby exception

Parameters:

  • exception (::Exception)

Returns:



18
19
20
21
22
23
24
# File 'lib/mutant/result/exception.rb', line 18

def self.from_exception(exception)
  new(
    backtrace:      exception.backtrace,
    message:        exception.message,
    original_class: exception.class.name
  )
end