--- Ryan Hoegg <[EMAIL PROTECTED]> wrote:
> 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.
> 

Logging was merely an example (probably a poor one).  I don't want to
handle exceptions from my logging package but I wouldn't want it to throw
RuntimeExceptions either (unless I've misused the API).

David

> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to