Class: Mnemosyne::Trace::Error
- Inherits:
-
Struct
- Object
- Struct
- Mnemosyne::Trace::Error
- Defined in:
- lib/mnemosyne/trace.rb
Constant Summary collapse
- BT_REGEXP =
/^((?:[a-zA-Z]:)?[^:]+):(\d+)(?::in `([^']+)')?$/
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
Instance Method Summary collapse
-
#serialize ⇒ Object
rubocop:disable AbcSize.
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error
52 53 54 |
# File 'lib/mnemosyne/trace.rb', line 52 def error @error end |
Instance Method Details
#serialize ⇒ Object
rubocop:disable AbcSize
56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/mnemosyne/trace.rb', line 56 def serialize { type: error.class.name, text: error., stacktrace: error.backtrace.map do |bt| md = BT_REGEXP.match(bt.to_s).to_a {file: md[1], line: md[2], call: md[3], raw: md[0]} end } end |