commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juozas Baliuka" <>
Subject Re: Checked vs Runtime exceptions
Date Wed, 25 Jun 2003 16:12:53 GMT

> In many cases that a database operation fails the next layer just cares
> that it gets notified of the failure and logs it (you could also have
> subclasses of MyException that indicate more specific failure types).
> MyException is allowing other layers to be independent of the persistence
> implementation exceptions like SQLException.
 Next layer faills too, doe's not it ? If you will handle MyExeption this
way in next layer you will log it twice and
It will dublicate code. I think It is better log all fatal exeptions in
single place, I prefer this way :

void register(MyObject value){

          Connection connection = getConnection();
" registred " + value.getId() );


The last layer ( resource management ) logs all unhandled exeptions and
releases resources.

Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
Version: 6.0.491 / Virus Database: 290 - Release Date: 2003.06.21

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message