db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dag.Wan...@Sun.COM (Dag H. Wanvik)
Subject Re: [jira] Commented: (DERBY-2770) testBlobAfterCommit(....jdbcapi.BlobClob4BlobTest) fails with 'Unexpected SQL state. expected:<XJ[073]> but was:<XJ[215]>'
Date Thu, 07 Jun 2007 23:53:11 GMT
"Knut Anders Hatlen (JIRA)" <jira@apache.org> writes:

> assertSQLState() succeeds if the main SQLException or its next
> exception matches. It doesn't traverse the entire chain.

Why two levels only? And is this always advisable? Seems to be it
could mask wrong behavior. The comment in the code seems to indicate
the intention is to check all, though ("any of them"...)

    // Check nested exceptions to see if any of them is
    // the one we're looking for.
    exception = exception.getNextException();
    if (exception != null)
       assertSQLState(message, expected, exception);
       throw e;

View raw message