File: notifier.rb

package info (click to toggle)
ruby-exception-notification 5.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 364 kB
  • sloc: ruby: 1,350; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 729 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

require "active_support/deprecation"

module ExceptionNotifier
  class Notifier
    def self.exception_notification(env, exception, options = {})
      ActiveSupport::Deprecation.warn(
        "Please use ExceptionNotifier.notify_exception(exception, options.merge(env: env))."
      )
      ExceptionNotifier.registered_exception_notifier(:email).create_email(exception, options.merge(env: env))
    end

    def self.background_exception_notification(exception, options = {})
      ActiveSupport::Deprecation.warn "Please use ExceptionNotifier.notify_exception(exception, options)."
      ExceptionNotifier.registered_exception_notifier(:email).create_email(exception, options)
    end
  end
end