Examples of RESTApplicationException


Examples of com.elasticinbox.rest.RESTApplicationException

    try {
      labelDAO.update(mailbox, label);
    } catch (IllegalLabelException ile) {
      throw new BadRequestException(ile.getMessage());
    } catch (ExistingLabelException ele) {
      throw new RESTApplicationException(Status.CONFLICT, ele.getMessage());
    } catch (Exception e) {
      logger.error("Updating label failed: ", e);
      return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
    }
View Full Code Here

Examples of com.elasticinbox.rest.RESTApplicationException

    try {
      newLabelId = labelDAO.add(mailbox, label);
    } catch (IllegalLabelException ile) {
      throw new BadRequestException(ile.getMessage());
    } catch (ExistingLabelException ele) {
      throw new RESTApplicationException(Status.CONFLICT, ele.getMessage());
    } catch (Exception e) {
      logger.error("Adding label failed", e);
      throw new WebApplicationException(Response.Status.INTERNAL_SERVER_ERROR);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.