@Provider
public class FooBarExceptionMapper implements
		ExceptionMapper<PersistenceException> {

	
	public Response toResponse(PersistenceException exception) {
		return Response.status(Status.INTERNAL_SERVER_ERROR).entity(exception.getMessage())
				.build();
	}

}
