1 |
torben |
2521 |
package dk.thoerup.webservice;
|
2 |
|
|
|
3 |
|
|
import javax.ws.rs.WebApplicationException;
|
4 |
|
|
import javax.ws.rs.core.Response;
|
5 |
|
|
|
6 |
|
|
public class PersonNotFoundException extends WebApplicationException {
|
7 |
|
|
|
8 |
|
|
private static final long serialVersionUID = 1L;
|
9 |
|
|
|
10 |
|
|
/**
|
11 |
|
|
* Create a HTTP 404 (Not Found) exception.
|
12 |
|
|
*/
|
13 |
|
|
public PersonNotFoundException() {
|
14 |
|
|
super(
|
15 |
|
|
Response.status(Response.Status.NOT_FOUND).
|
16 |
|
|
entity("Person not found").
|
17 |
|
|
type("text/plain").build()
|
18 |
|
|
);
|
19 |
|
|
}
|
20 |
|
|
|
21 |
|
|
/**
|
22 |
|
|
* Create a HTTP 404 (Not Found) exception.
|
23 |
|
|
* @param message the String that is the entity of the 404 response.
|
24 |
|
|
*/
|
25 |
|
|
/* public PersonNotFoundException(String message) {
|
26 |
|
|
super(
|
27 |
|
|
Response.status(Response.Status.NOT_FOUND).
|
28 |
|
|
entity("Person not found").
|
29 |
|
|
type("text/plain").build()
|
30 |
|
|
);
|
31 |
|
|
}*/
|
32 |
|
|
} |