Sha256: 613d47468b6367f7e5dcedc04c8bd42e36e23234041a19313727eef3d0e5b9ef

Contents?: true

Size: 500 Bytes

Versions: 1

Compression:

Stored size: 500 Bytes

Contents

class RollbarHelper
  VERSION = "0.0.3"

  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

    def configure
      Rollbar.configure do |config|
        yield(config)
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rollbar_helper-0.0.3 lib/rollbar_helper.rb