commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Hoegg <rho...@isisnetworks.net>
Subject Re: Checked vs Runtime exceptions
Date Wed, 25 Jun 2003 14:50:30 GMT
This may be the "correct solution" in some of your eyes, but it is far 
too much overhead for most programmers who want to use logging.  If my 
database server is down or the logging directory can not be found when I 
want to log something, my application code is not the right place to 
handle that.MyMethodUsesLogging has no business handling those 
exceptional cases.  I think a RuntimeException is most appropriate here.

Juozas Baliuka wrote:

> I think this logging example was a good one:
>
> void MyMethodUsesLogging()throws MyException{
>  try{
>
>   log.info("started");
>
> }catch(LoggingException e){
>
>   log.error(e); // ??????????????????
>
>   throw new MyExeption(e);
> } 
>  
>
>} 
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message