On Thu July 23 2009 1:09:14 pm [email protected] wrote:
> Most probably I am doing something wrong. Because if I throw any unchecked
> exception it gets propagated both to the client and the Web Container. At
> least I tried with javax.xml.ws.ProtocolException and it got propagated to
> my Tomcat Web Container. Should I be using checked exceptions?
> Any tutorial or document that explains this?

Definite "propogated"?   Unchecked exceptions are logged to the 
java.util.Logging stuff.   But they aren't propagated to the web container.

> Should I be using checked exceptions?

Probably yes if you expect the client to be able really make heads or tails of 
the exception and not just get a generic "fault".

Basically, the "checked" exceptions don't get a full stacktrace log as they 
are more or less expected.   Unchecked exceptions get a full stack trace as 
they should be for really exceptional cases that the dev probably needs to 
know about.  (like NullPointerException type things)

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to