Description
When a JDBC driver throws a non-SQLException (e.g., RuntimeException), the error message propagated to Python users is uninformative. Our _handle_sql_exception_jpype() wraps these as InterfaceError but does not extract the Java exception cause chain, leaving users with just a generic "Java Exception" message.
This was reported when long Presto queries failed with a 502 Bad Gateway wrapped in a RuntimeException, but the user could not determine the root cause from the error message.
Legacy issue: baztian/jaydebeapi#250
Description
When a JDBC driver throws a non-SQLException (e.g.,
RuntimeException), the error message propagated to Python users is uninformative. Our_handle_sql_exception_jpype()wraps these asInterfaceErrorbut does not extract the Java exception cause chain, leaving users with just a generic "Java Exception" message.This was reported when long Presto queries failed with a 502 Bad Gateway wrapped in a
RuntimeException, but the user could not determine the root cause from the error message.Legacy issue: baztian/jaydebeapi#250