From: Paul H. <pa...@ha...> - 2006-06-29 15:21:58
|
Greg, >> The Java OSS community has lurched in the direction of >> RuntimeException in the last few years, co-incidentally the same >> as .Net. > > What other examples do you have of this lurching to RuntimeExceptions > PicoContainer, XStream, I'll ask around for others. >> I'll let it go, as I can't overcome a 4-1 vote against. > > Don't give up if you feel strongly about it Ahh, but a frequent collaborator (Peter) has chimed in in your favor. > - I am always open to > be convinced of better ways. I see the uglyness of throws > Exception, > but I currently think it is the best solutions and encourages > implementors > of LifeCycle to fail fast during a call to start rather than later > in a thread etc. The actual root causes of .. catch (Exception e) { // etc throw e; } are .. InstantiationException IllegalAccessException ClassNotFoundException NamingException ServletException I've not analyzed everything, but the first three a frequent consequence of Class.newInstance(). They and NamingException are just infrasctructural glue. I'm not sure what the ServletException is for - i've not tracked it further up the cascades of 'throws ServletException' methods. I would (we did for Pico), define an exception (say JettyException that extends Runtime). In your case, I'd suggest extending that further into at least JettyNamingException, JettyReflectionException (wraps InstantiationException, IllegalAccessException or ClassNotFoundException), and as I say ServletException needs further work. The exceptions will still arrive at the level where the user was formerly forced to 'catch Exception(..)' Its just a strongly typed Runtime derivative. As I say, though, I happy for it to be left as is. Regards, - Paul > > cheers > > > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > jetty-discuss mailing list > jet...@li... > https://lists.sourceforge.net/lists/listinfo/jetty-discuss > |