Retrieving RAISERROR from Stored Procedure

try:
    ....
except java.lang.Exception, e:
    print e.getCause()

In this case it prints:

com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Invalid parameter: @sid cannot be NULL.

Which is a little bit clearer than the bare java.lang.Exception.

Thanks!