Module: ExceptionNotifier::BacktraceCleaner

Included in:
SlackNotifier
Defined in:
lib/exception_notifier/modules/backtrace_cleaner.rb

Instance Method Summary collapse

Instance Method Details

#clean_backtrace(exception) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/exception_notifier/modules/backtrace_cleaner.rb', line 4

def clean_backtrace(exception)
  if defined?(Rails) && Rails.respond_to?(:backtrace_cleaner)
    Rails.backtrace_cleaner.send(:filter, exception.backtrace)
  else
    exception.backtrace
  end
end