jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Kiehl ...@sulu3000.de>
Subject Re: Logging of exceptions
Date Thu, 09 Aug 2007 07:22:52 GMT
Christoph Kiehl wrote:

> Maybe the following:
> 
> private boolean hasNonVirtualItemState(ItemId id) {
>      [...]
>      } catch (ItemStateException ise) {
>          return false;
>      }
>      [...]
> }
> 
> should be rewritten to:
> 
> private boolean hasNonVirtualItemState(ItemId id) {
>      [...]
>      } catch (NoSuchItemStateException ise) {
>          return false;
>      } catch (ItemStateException ise) {
>          log.error(ise.getMessage(), ise);
>          throw new RuntimeException(ise);
>      }
>      [...]
> }

Well, maybe throwing a RepositoryException instead of a RuntimeException 
would be more appropriate ;)

Cheers,
Christoph


Mime
View raw message