Package com.elasticinbox.rest

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


    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

Related Classes of com.elasticinbox.rest.RESTApplicationException

Copyright © 2018 www.massapicom. 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.