Equivalent to WebApplicationException(String message, int status) in JavaEE6

114 Views Asked by At

I know that the method is introduced in Java EE 7 with JAX-RS 2.0.

I want to throw such exception with detailMessage included in Java EE 6.

In Java EE 7 I could simply do:

throw new WebApplicationException("My Error Msg", statusCode);

But how can I do this with Java EE 6?

http://docs.oracle.com/javaee/7/api/javax/ws/rs/WebApplicationException.html http://docs.oracle.com/javaee/6/api/javax/ws/rs/WebApplicationException.html

0

There are 0 best solutions below