File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 33Features:
44 - Added two new configuration options, ` filter_payload_with_whitelist ` and ` whitelist_payload_shape `
55 - See [ README.md] ( https://github.com/MindscapeHQ/raygun4ruby#filtering-the-payload-by-whitelist ) for an example of how to use them
6+ - When raygun4ruby encounters an exception trying to track an exception it will try once to send that exception to Raygun so you are notified
67
78Bugfixes:
89 - raygun4ruby will no longer crash and suppress app exceptions when the API key is not configured
Original file line number Diff line number Diff line change @@ -46,14 +46,24 @@ def configured?
4646 !!configuration . api_key
4747 end
4848
49- def track_exception ( exception_instance , env = { } )
49+ def track_exception ( exception_instance , env = { } , retry_count = 1 )
5050 if should_report? ( exception_instance )
5151 log ( "[Raygun] Tracking Exception..." )
5252 Client . new . track_exception ( exception_instance , env )
5353 end
5454 rescue Exception => e
5555 if configuration . failsafe_logger
5656 failsafe_log ( "Problem reporting exception to Raygun: #{ e . class } : #{ e . message } \n \n #{ e . backtrace . join ( "\n " ) } " )
57+ end
58+
59+ if retry_count > 0
60+ new_exception = e . exception ( "raygun4ruby encountered an exception processing your exception" )
61+ new_exception . set_backtrace ( e . backtrace )
62+
63+ env [ :custom_data ] ||= { }
64+ env [ :custom_data ] . merge! ( original_stacktrace : exception_instance . backtrace )
65+
66+ track_exception ( new_exception , env , retry_count - 1 )
5767 else
5868 raise e
5969 end
You can’t perform that action at this time.
0 commit comments