"Knut Anders Hatlen (JIRA)" <[EMAIL PROTECTED]> 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);
    else
       throw e;
            
Dag

Reply via email to