Java Programming Help
David Lloyd
lloy0076 at adam.com.au
Wed Dec 27 00:04:23 CST 2006
Trevor,
>> The behaviour I would expect would be for the program to output
>> "Customised Exception" (line 20) at least once. I expect that to occur
>> because the exception specifier is "Exception ex" - i.e.
>> java.lang.Exception OR any of its descendants.
>>
>
> I don't think that ValidatorUtils.getValueAsString is actually throwing
> the NoSuchMethodException, I think it is swallowing the exception and
> returning null.
Well spotted.
> If you put something like: System.out.println("rval: " + rval); after
> line 18 (in your pastebin). I'd expect that your would see the exception
> trace and then:
I did exactly that; it appears that the logging that the validator
classes goes to the same place that I currently have exceptions to be
sent to. Consequently, if I have a log that looks like an exception it
can deceive me into thinking that the *log* is an *exception*.
I thought that the sequence went:
*things to log*
AN EXCEPTION OCCURED
Whereas the sequence actually went:
*things to log*
NO EXCEPTION OCCURED
Lesson: just because it looks like an exception doesn't mean it is one :(
DSL
More information about the linuxsa
mailing list