forked from smartinez87/exception_notification
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
47e4c2b
commit 54f0eca
Showing
2 changed files
with
21 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ class << self | |
attr_writer :default_exception_recipients | ||
attr_writer :default_email_prefix | ||
attr_writer :default_sections | ||
|
||
def default_sender_address | ||
@default_sender_address || %("Exception Notifier" <[email protected]>) | ||
end | ||
|
@@ -65,25 +65,24 @@ def exception_notification(env, exception) | |
end | ||
|
||
private | ||
|
||
def clean_backtrace(exception) | ||
Rails.respond_to?(:backtrace_cleaner) ? | ||
Rails.backtrace_cleaner.send(:filter, exception.backtrace) : | ||
exception.backtrace | ||
end | ||
|
||
helper_method :inspect_object | ||
|
||
def inspect_object(object) | ||
case object | ||
when Hash, Array | ||
object.inspect | ||
when ActionController::Base | ||
"#{object.controller_name}##{object.action_name}" | ||
else | ||
object.to_s | ||
end | ||
|
||
def clean_backtrace(exception) | ||
Rails.respond_to?(:backtrace_cleaner) ? | ||
Rails.backtrace_cleaner.send(:filter, exception.backtrace) : | ||
exception.backtrace | ||
end | ||
|
||
helper_method :inspect_object | ||
|
||
def inspect_object(object) | ||
case object | ||
when Hash, Array | ||
object.inspect | ||
when ActionController::Base | ||
"#{object.controller_name}##{object.action_name}" | ||
else | ||
object.to_s | ||
end | ||
end | ||
end | ||
end |