102103104105106107108109
public void deleteMessage(@PathParam("msgNum") int msgNum) throws NotFoundException { boolean deleted = singleton.deleteMessage(msgNum); if(!deleted) { // This exception will be mapped to a 404 response throw new NotFoundException(); } }