db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Army <qoz...@gmail.com>
Subject Re: What error action is taken when "ENVIRONMENTAL" errors are raised
Date Fri, 30 Mar 2007 21:14:36 GMT
Mike Matrigali wrote:
> I was left with a set of exceptions with no explicit mapping, so my 
> reading is that they default to ENVIRONMENTAL severity, but it is not
> clear to me what action is taken if we raised this level.  For what I
> am trying to tell do we back out the statement or not?

Are you asking if we *should* back out the statement, are you asking if we *do* 
back out the statement?

> "XML" errors - not sure what severity action is taken:
>     String LANG_MISSING_XML_CLASSES                = "XML00";
>     String LANG_UNEXPECTED_XML_EXCEPTION           = "XML01";

If either of these errors occurs I would expect that the statement in question 
_should_ effectively be "backed out".  So I guess this means that they should 
have "statement" severity?

Note that XML00 should theoretically occur before any changes to the database 
occur, so I would expect that backing the statement out would be no-op for that 
kind of error.  XML01 is by nature "unexpected" so it could occur at pretty much 
any point during XML processing, and thus may require "back out".  If that's not 
done automatically then I don't know how to make it happen; would marking it as 
"statement severity" (by adding ".S" to it) be sufficient?

>    String LANG_XML_QUERY_ERROR                     = "10000";

This is similar to LANG_UNEXPECED_XML_EXCEPTION, except that the unexpected 
error occured while evaluating an XQuery (or in the case of Derby, XPath) 
expression.  SQL/XML 2003 spec says that such an error should have SQLSTATE 
10000.  So I think this should have an explicit "statement" severity, as well.

I admit I don't really know much about severity actions, so I don't know if I've 
answered your question or not...apologies for my ignorance here.


View raw message