Ok. So I will move the NotFoundException to core.persistence.dao and make it a RuntimeException.
I created issue https://issues.apache.org/jira/browse/SYNCOPE-291 to track this. Christian On 24.01.2013 12:33, Francesco Chicchiriccò wrote: > On 24/01/2013 12:25, Christian Schneider wrote: >> The NotFoundException is currently located in util which is not such a >> good place as it is part of the dao as well as service interfaces. >> >> So I propose to move this exception either to >> 1. common.services >> In this case the NotFoundException could also be used in the >> service >> interfaces. So we would not have to handle the http specific not found >> exception >> 2. core.persistence.dao >> In this case the NotFoundException would be private to the core and >> we would have to use e.g. the jax rs NotFoundException in the service >> interfaces > > I would opt for (2), guessing that "jax rs NotFoundException" has some > sort of more natural mapping to HTTP 404. > >> I also propose to change the exception to be unchecked to not force each >> caller to catch it. > > +1 > > Regards. > -- Christian Schneider http://www.liquid-reality.de Open Source Architect http://www.talend.com