JSR-311 can use "Extended Annotations" to annotate throws clause
exceptions as:
@Path("/some/<id>")
@GET
public Some getSome(@UriParameter("id" String id) throws @Status(404)
NotFoundException, OtherException {
...
}
note: any not annotated exception must be response a status=500
(Server Error)
This new feature (of annotations) avoids the use of
WebApplicationException, but JSR308 must be available on Java SE 7...