From 4406ab9c57f4b493e2e4cfb2ed0f93a74b1a2c93 Mon Sep 17 00:00:00 2001 From: Konstantin Krivopustov Date: Mon, 23 Nov 2015 05:45:46 +0000 Subject: [PATCH] cuba.uniqueConstraintViolationPattern does not work. #PL-6180 --- .../cuba/gui/exception/UniqueConstraintViolationHandler.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/gui/src/com/haulmont/cuba/gui/exception/UniqueConstraintViolationHandler.java b/modules/gui/src/com/haulmont/cuba/gui/exception/UniqueConstraintViolationHandler.java index 479a11fbff..a0fd3697d5 100644 --- a/modules/gui/src/com/haulmont/cuba/gui/exception/UniqueConstraintViolationHandler.java +++ b/modules/gui/src/com/haulmont/cuba/gui/exception/UniqueConstraintViolationHandler.java @@ -38,8 +38,7 @@ public class UniqueConstraintViolationHandler implements GenericExceptionHandler Throwable t = exception; try { while (t != null) { - if (t.toString().contains("org.springframework.dao.DataIntegrityViolationException") - || t.toString().contains("org.springframework.orm.jpa.JpaSystemException")) { + if (t.toString().contains("org.eclipse.persistence.exceptions.DatabaseException")) { return doHandle(t, windowManager); } t = t.getCause();