class Failbot::Backtrace

A simple parser to extract structure from ruby backtraces.

See docs.sentry.io/development/sdk-dev/event-payloads/stacktrace/ for details on what data can sent

Constants

ParseError

Raised when a line fails parsing.

Attributes

frames[R]

Public Class Methods

new(frames) click to toggle source
# File lib/failbot/backtrace.rb, line 21
def initialize(frames)
  @frames = frames
end
parse(backtrace) click to toggle source
# File lib/failbot/backtrace.rb, line 11
def self.parse(backtrace)
  fail ArgumentError, "expected Array, got #{backtrace.class}" unless backtrace.is_a?(Array)

  frames = backtrace.map do |frame|
    Frame.parse(frame)
  end

  new(frames)
end