Hi Xavier,
As you have a RestExceptionMapper dealing with RestCommonException, you
should have:
@GET
@Path("/foo")
public String hello(String message) throws RestCommonException {
...
}
?
Regards
JB
On 02/04/2019 10:27, xav wrote:
> Hi all,
>
> I use https://github.com/apache/aries-jax-rs-whiteboard on karaf to provide
> a REST API.
> It's works but now I try to provide an ExceptionMapper with the annotation
> @Provider
>
> @Provider
> public class RestExceptionMapper implements
> ExceptionMapper<RestCommonException> {
>
> ......
> ......
> }
>
> But unfortunately, my exception is not trap ????
> In my main class, I write it like this:
> @Component(
> property = { "osgi.jaxrs.resource=true" },
> service = SayHelloRestService.class, name = "SayHello", immediate =
> true)
> @Path(REST_PREFIX_RESSOURCE + "sayhello")
> public class SayHelloRestService
>
>
> Regards
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com