I am using the Bottle framework. I have set the @error
decorator so I am able to display my customized error page, and i can also send email if any 500 error occurs, but I need the complete traceback to be sent in the email. Does anyone know how to have the framework include that in the e-mail?
views:
35answers:
2
A:
Debugging mode enables full tracebacks:
from bottle import debug
debug(True)
From there, you will need to pipe stderr
to a file, then send it.
Tim McNamara
2010-07-29 23:03:07
The accepted answer here is much better: http://stackoverflow.com/questions/3324743/emailing-admin-when-a-500-error-occurs
Tim McNamara
2010-07-29 23:10:11
Hi Tim, Thanks for the reply, i have done the debug(True), i am able to get the 500 error with traceback on my browser, how can i pipe the stderr to a file, can you show some example.
Suhail
2010-07-30 03:43:28
Hey tim, thanks for the help, i got the solution, in the error500 function written after the @error decorator to serve my customized error page, wrote error.exception and error.traceback, these two give you the exception and complete traceback of the error message, i took help from Marcel the creator of Bottle Framework and he showed me the solution.
Suhail
2010-08-03 03:12:18
Happy to help. Am glad things are working forr you.
Tim McNamara
2010-08-03 03:17:53
A:
in the error500 function written after the @error decorator to serve my customized error page, wrote error.exception
and error.traceback
, these two give the exception and complete traceback of the error message.
Suhail
2010-08-03 03:13:39