Patch #1412
closedexception handling extension
0%
Description
SourceForge user: gschadow
Hi Michael, again.
here is an self-consistent extension that adds exception
handling to Saxon 8.1.1. I've done this since Saxon6
through many version of 7 and now for 8.1.1. Have been
using this a lot since then.
The use case is if you work with a database or other
extensions that could throw exceptions and fail. If you
have users depending on this or -- as in my case -- you
have long-running batch jobs, you don't want an
exception to kill you entire process. Example:
<xsl:variable name="documentFromString">
<xsl:sequence select="saxon:parse($string)"/>
<ex:catch exception="java.sql.SQLException">
<invalid/>
</ex:catch>
</ex:try>
</xsl:variable>
<xsl:if test="not($documentFromString/invalid)">
... do the normal thing ...
</xsl:if>
you see, if the $string (e.g., pulled from a database that
stores XML chunks) contains garbage, the process
doesn't fail but has a way to fall back gracefully.
I think the value of this is 100x more important than
the -- excuse me -- skimpy little SQL extension that you
distribute. So, if you might consider adopting this I
would be eternally grateful (even more so than I am
anyway for your making saxon in the first place :-)
If you like me to make one final adaptation to your
coding style (where style and instruction is separated) I
will gladly do that for you on the promise that you will
adopt.
regards,
-Gunther
Files
Please register to edit this issue