You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2012/02/27 12:42:58 UTC
svn commit: r1294117 -
/incubator/syncope/trunk/core/src/main/webapp/syncopeClientError.jsp
Author: ilgrosso
Date: Mon Feb 27 11:42:58 2012
New Revision: 1294117
URL: http://svn.apache.org/viewvc?rev=1294117&view=rev
Log:
Improving error reporting with PostgreSQL and Oracle
Modified:
incubator/syncope/trunk/core/src/main/webapp/syncopeClientError.jsp
Modified: incubator/syncope/trunk/core/src/main/webapp/syncopeClientError.jsp
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/webapp/syncopeClientError.jsp?rev=1294117&r1=1294116&r2=1294117&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/webapp/syncopeClientError.jsp (original)
+++ incubator/syncope/trunk/core/src/main/webapp/syncopeClientError.jsp Mon Feb 27 11:42:58 2012
@@ -1,3 +1,4 @@
+<%@page import="org.springframework.orm.jpa.JpaSystemException"%>
<%@page isErrorPage="true" session="false" contentType="application/json" pageEncoding="UTF-8"%>
<%@page import="org.syncope.types.EntityViolationType"%>
<%@page import="java.util.Set"%>
@@ -118,7 +119,9 @@
ex.getMessage());
statusCode = HttpServletResponse.SC_BAD_REQUEST;
- } else if (ex instanceof DataIntegrityViolationException) {
+ } else if (ex instanceof DataIntegrityViolationException
+ || ex instanceof JpaSystemException) {
+
response.setHeader(
SyncopeClientErrorHandler.EXCEPTION_TYPE_HEADER,
SyncopeClientExceptionType.DataIntegrityViolation.getHeaderValue());