tada / pljava

PL/Java is a free add-on module that brings Java™ Stored Procedures, Triggers, Functions, Aggregates, Operators, Types, etc., to the PostgreSQL™ backend.
http://tada.github.io/pljava/
Other
238 stars 77 forks source link

Consistent (SAX/DOM) wrapping of XML parse errors #482

Closed jcflack closed 3 months ago

jcflack commented 3 months ago

The logic that chooses wrapping SQLException subclass and SQLstate for XML parse exceptions and I/O exceptions in XMLCopier.saxCopy is now duplicated in AdjustingDOMSource.get, to eliminate the inconsistency that an XML parse error would be reported as a class 22 SQLDataException if using the SAX or StAX APIs, but as a class XX internal-error SQLException if using the DOM API.

Addresses issue #481.

This does change a user-visible behavior. It would be straightforward to make it depend on a flag, if there exists any code depending on the prior behavior. (I am judging that unlikely.)