Catch IOException?

Consider using two except blocks, as jython’s standard Exception won’t catch pure java exceptions. Like so:

import java.lang.Exception

try:
    # something something something
except Exception, e:
    # jython exception
except java.lang.Exception, e:
    # java exception
6 Likes