directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject Re: Exception to be or not to be?
Date Mon, 07 Jun 2010 14:53:35 GMT
On 6/7/10 4:43 PM, Felix Knecht wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Should an exception be thrown or not?
>    

Sure we must !!!

> public final void modify( ModifyOperationContext modifyContext ) throws
> LdapException
> {
>      try
>      {
>          Entry modifiedEntry = store.modify( modifyContext.getDn(),
> modifyContext.getModItems() );
>          modifyContext.setAlteredEntry( modifiedEntry );
>      }
>      catch ( Exception e )
>      {
>    
Bad bad bad ! throw new DirtyCodeException( "Yuuuk !!" );
>      }
> }
>    

-- 
Regards,
Cordialement,
Emmanuel L├ęcharny
www.nextury.com



Mime
View raw message