I've noticed that xwork/webwork uses very general, non-specific exceptions.
It's definitely discourages strong java exception contracts in many places.
Is it intentional, or it's just happened to be that way?

Example - I know that somewhere in my code OgnlException could occur.
However it's intercepted by
com.opensymphony.xwork.util.CompoundRootAccessor.setProperty() which kindly
wraps it in RuntimeException. The funny part is that it actually declares to
throw OgnlException. Xwork's OgnlStack wrapper also ignores any
OgnlException - of course it doesn't matter cause they're rewrapped
underneath.

IMHO it's weak part of xwork/webwork. It results in code that it's hard to
debug. Once there is java.lang.NumberFormatExceptions that tells everything
of what happened, then it's wrapped in OgnlException - good enough cause
it's linked to the causing exception. And finally - there is a meaningless
RuntimeException.

In xwork RuntimeException is used 5 times. Same stats in webwork. I would
say it makes sense in no place.

-- Mike



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to