[reportlab-users] Error Log

Robin Becker robin at reportlab.com
Thu Jan 17 12:56:47 EST 2008


Brandon Rich wrote:

> I am trying to create a error log that handles exceptions that are

> thrown. Right now, I have an if, elif in place, and if neither happens,

> would like to log an error, and two, exit gracefully upon exception. I

> have not found any documentation on this and was curious if anyone could

> give an example, or point me in a direction to look at.

>

>

>

> Thanks

........

well for this sort of python coding question you can ask nicely on
comp.lang.python or perhaps on the tutor list see
http://mail.python.org/mailman/listinfo/tutor.


Exceptions are generically handled like this

try:
code
except ExceptionClass:
process exception.

ExceptionClass is some kind of exception class you want to handle; see
http://docs.python.org/tut/node10.html.

The if statement is described here
http://docs.python.org/tut/node6.html#SECTION006100000000000000000

--
Robin Becker


More information about the reportlab-users mailing list