Class: Mnemosyne::Trace::Error

Inherits:
Struct
  • Object
show all
Defined in:
lib/mnemosyne/trace.rb

Constant Summary collapse

BT_REGEXP =
/^((?:[a-zA-Z]:)?[^:]+):(\d+)(?::in `([^']+)')?$/

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#error ⇒ Object

Returns the value of attribute error

Returns:

  • (Object) —

    the current value of error



59
60
61
# File 'lib/mnemosyne/trace.rb', line 59

def error
  @error
end

Instance Method Details

#serialize ⇒ Object



62
63
64
65
66
67
68
# File 'lib/mnemosyne/trace.rb', line 62

def serialize
  {
    type: error.class.name,
    text: error.message.to_s,
    stacktrace: serialize_backtrace
  }.compact
end