You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by ar...@EASTPOINT.COM on 2002/12/10 18:38:16 UTC

SQL Errors and ErrorListener

I am continuing to work with the Xalan SQL extension. Presently I am looking
into error handling. The current code for the SQL extension records errors
in an internal element that may be retrieved using XConnection.getError(). I
am wondering if it may not make sense to also report it to the
ErrorListener? I am thinking that perhaps calling ErrorListener.warning()
with the exception would be beneficial. Where I am coming from on this is
that in the event of a database error, I may want to take one action for the
transformation output - like include some user friendly text, but log some
more detailed information (the exception, etc) for debugging purposes. I
suppose that it may be possible to use <xsl:message> for some of this, but I
have not yet found any documentation on how Xalan handles this nor have I
tried it yet (or gone into the code for it). It seems to me that the
ErrorListener is the correct way to go.

I did come across Bugzilla 10414 that mentions the ErrorListener (actually
it says Error Handler) in the context of writing extensions and states that
the usage should be documented (does not look like this has been done yet).

If this would be a good thing to do (report SQL errors with
ErrorListener.warning()) then I can include that change with my other
changes that I will be proposing.

RFC: I am still listening for any comments on my last proposed changes to
the SQL extension.

Art