Python script Try Except + logging exception

I’ve got a python script running a named query, I’m trying to catch any exceptions thrown and log an error to the wrapper logs.

This works when I just use
try:
except:

However, I’d like to be able to log the exception message. But if I use:
try:
except Exception, e:

not ALL exceptions are caught anymore… is there any other generic “Exception” type that I need to use to catch all exceptions and log the message?

4 Likes