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);
}
}