Examples of CrysonEntityConflictException


Examples of se.sperber.cryson.exception.CrysonEntityConflictException

  public void translateHibernateExceptions(Throwable t) throws Throwable {
    LOGGER.error("Translating exception", t);
    if (t instanceof CrysonException) {
      throw t;
    } else if (t instanceof OptimisticLockException || t instanceof HibernateOptimisticLockingFailureException || t instanceof StaleObjectStateException) {
      throw new CrysonEntityConflictException("Optimistic locking failed", t);
    } else {
      throw new CrysonException("Unclassified error: " + t.getMessage(), t);
    }
  }
View Full Code Here

Examples of se.sperber.cryson.exception.CrysonEntityConflictException

  private Response translateThrowable(Throwable t) {
    LOGGER.error("Error", t);
    if (t instanceof CrysonException) {
      return translateCrysonException((CrysonException)t);
    } else if (t instanceof OptimisticLockException || t instanceof HibernateOptimisticLockingFailureException || t instanceof StaleObjectStateException) {
      return translateCrysonException(new CrysonEntityConflictException("Optimistic locking failed", t));
    } else if (t instanceof AccessDeniedException) {
      return Response.status(Response.Status.UNAUTHORIZED).entity(buildJsonMessage(t.getMessage())).build();
    } else if (t instanceof ParseException) {
      return Response.status(Response.Status.BAD_REQUEST).entity(buildJsonMessage(t.getMessage())).build();
    } else {
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.