The python example provided could be confusing in some contexts. The code example provided should omit the
try/except, since the default Raven module instantiation defaults to
If your application already has it’s own error handling, and you’d like to enhance that error handling to report exceptions to Sentry, make sure you provide
install_sys_hook=False and then explicitly call
client.captureException() in your own except block.
Don’t forget to merge your own ‘tags’ or other context information before the captureException, and remember to clear it after the exception is reported if you’re continuing on instead of terminating…