Using Try/Except to Dummy Proof & Check if SQL Tables/Columns Exist

Ah, missed that. A bare “except” block doesn’t necessarily catch java exceptions. Use a structure like this:

import java.lang.Exception

try:
    # some code that can throw either java exceptions or python exceptions
except java.lang.Exception, e:
    # Handle the java exception in 'e', possibly using e.cause to drill into the nesting
except Exception, e:
    # Handle the python exception in 'e'.  Note that python doesn't need to import its native exception