I am continuing my work on the Xalan SQL extension enhancements (after a bit of a hiatus). One of my developers brought it to my attention that SQL warnings do not get logged anywhere and are not accessible. The SQL warnings are things like SQL PRINT and RAISERROR output. For my purposes I just need these to go to a log (via the ErrorListener).
I am wondering if there is any interest in a method to get the messages, perhaps XConnection.getMessage() akin to XConnection.getError()?
This also brings up a couple of questions. If there is interest in access to the messages, how should they be formatted? Also, and this applies to the errors as well, Messages are chained (SQLWarning.getNextWarning() obtains the next warning in the chain - similarly SQLException.getNextException() gets the next exception). If we create a getWarning() method, should it return all the warnings or just the first one in the chain. Also for getError(), same question.
Again, my own concern at this point is just that the warnings make it to the log. For this I am planning to just pass the warning to the ErrorListener (SQLWarning extends SQLException). Eventually then my error handler will determine if it wants to do anything with the SQLWarning and/or if the chain should be handled.
My personal feeling is that since I have not heard anyone make any mention of handling warnings (or errors/Exceptions for that matter) with the Xalan SQL Extension that it would not be important that they be accessible to the stylesheet.
Thank You,
Art
