Sha256: 38919d03b79e7b11d700e5401b8bc9edd4ff17e49c3285beb258f437707a343f

Contents?: true

Size: 405 Bytes

Versions: 1

Compression:

Stored size: 405 Bytes

Contents

class RollbarHelper
  VERSION = "0.0.4"

  class << self

    def error(obj, fingerprint: nil)
      e = nil

      if obj.is_a?(Exception)
        e = obj
      else
        e = StandardError.new(obj.to_s)
        e.set_backtrace(caller)
      end

      if fingerprint.present?
        Rollbar.scope(:fingerprint => fingerprint).error(e)
      else
        Rollbar.error(e)
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rollbar_helper-0.0.4 lib/rollbar_helper.rb