Open alecgibson opened 1 year ago
According to the docs, exitOnUncaughtException should:
exitOnUncaughtException
Exit the process after handling an uncaught exception. Requires captureUncaught to also be set.
captureUncaught
So with this config:
var rollbar = new Rollbar({ captureUncaught: true, exitOnUncaughtException: true, // ... });
...an uncaught exception should exit the process.
This works correctly, but only if rollbar.configure() is never called again, because:
rollbar.configure()
configure()
setupUnhandledCapture()
handleUncaughtExceptions()
options.exitOnUncaughtException
uncaughtException
exitOnUncaught = false
This change:
options.captureUncaught
@waltjones any chance of please getting this reviewed? We've still got an ugly patch in our code to work around this issue.
Description of the change
According to the docs,
exitOnUncaughtException
should:So with this config:
...an uncaught exception should exit the process.
This works correctly, but only if
rollbar.configure()
is never called again, because:exitOnUncaughtException
was deleted from our optionsconfigure()
callssetupUnhandledCapture()
...handleUncaughtExceptions()
...options.exitOnUncaughtException
uncaughtException
handler, we now haveexitOnUncaught = false
This change:
exitOnUncaughtException
from options (it's unclear why this is the only option that is deleted)options.exitOnUncaughtException
in the handler, just likeoptions.captureUncaught
is accessed directlyType of change
Development
Code review