incubator-baremaps icon indicating copy to clipboard operation
incubator-baremaps copied to clipboard

Print offending query or file when there's a PostgreSQL exception

Open polastre opened this issue 2 years ago • 1 comments

When you get org.postgresql.util.PSQLException, there's a stack trace with something like:

java.util.concurrent.ExecutionException: org.apache.baremaps.workflow.WorkflowException: org.apache.baremaps.workflow.WorkflowException: org.apache.baremaps.workflow.WorkflowException: org.postgresql.util.PSQLException: ERROR: column "name" does not exist

However there's no indication of which file or sql statement caused this exception.

I believe in v0.7.1, it would tell you which sql statement was just executed. In the v0.7.2-rc, it doesn't tell you which sql statement.

I'm running import with the log level set to debug and can't track down the offending sql.

It would be helpful to include more debugging information here to be developer friendly.

polastre avatar Aug 31 '23 00:08 polastre

Thanks a lot for reporting this, we should definitely log the exception.

bchapuis avatar Aug 31 '23 12:08 bchapuis