You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by an...@apache.org on 2018/11/20 08:17:40 UTC
[syncope] branch 2_0_X updated: [SYNCOPE-1398] entity exists
exception now is correctly propagated and shown to/in console
This is an automated email from the ASF dual-hosted git repository.
andreapatricelli pushed a commit to branch 2_0_X
in repository https://gitbox.apache.org/repos/asf/syncope.git
The following commit(s) were added to refs/heads/2_0_X by this push:
new dc2005f [SYNCOPE-1398] entity exists exception now is correctly propagated and shown to/in console
dc2005f is described below
commit dc2005f1733c9e11ff482325130b97d235ef711a
Author: Andrea Patricelli <an...@apache.org>
AuthorDate: Tue Nov 20 09:17:26 2018 +0100
[SYNCOPE-1398] entity exists exception now is correctly propagated and shown to/in console
---
.../syncope/core/workflow/activiti/ActivitiUserWorkflowAdapter.java | 2 ++
.../syncope/core/workflow/flowable/FlowableUserWorkflowAdapter.java | 2 ++
2 files changed, 4 insertions(+)
diff --git a/core/workflow-activiti/src/main/java/org/apache/syncope/core/workflow/activiti/ActivitiUserWorkflowAdapter.java b/core/workflow-activiti/src/main/java/org/apache/syncope/core/workflow/activiti/ActivitiUserWorkflowAdapter.java
index 01647c5..a1c63a7 100644
--- a/core/workflow-activiti/src/main/java/org/apache/syncope/core/workflow/activiti/ActivitiUserWorkflowAdapter.java
+++ b/core/workflow-activiti/src/main/java/org/apache/syncope/core/workflow/activiti/ActivitiUserWorkflowAdapter.java
@@ -154,6 +154,8 @@ public class ActivitiUserWorkflowAdapter extends AbstractUserWorkflowAdapter {
throw (ParsingValidationException) e.getCause().getCause();
} else if (e.getCause().getCause() instanceof InvalidEntityException) {
throw (InvalidEntityException) e.getCause().getCause();
+ } else if (e.getCause().getCause().getClass().getName().contains("persistence")) {
+ throw (RuntimeException) e.getCause().getCause();
}
}
diff --git a/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/FlowableUserWorkflowAdapter.java b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/FlowableUserWorkflowAdapter.java
index 91f1fc6..4e50994 100644
--- a/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/FlowableUserWorkflowAdapter.java
+++ b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/FlowableUserWorkflowAdapter.java
@@ -153,6 +153,8 @@ public class FlowableUserWorkflowAdapter extends AbstractUserWorkflowAdapter {
throw (ParsingValidationException) e.getCause().getCause();
} else if (e.getCause().getCause() instanceof InvalidEntityException) {
throw (InvalidEntityException) e.getCause().getCause();
+ } else if (e.getCause().getCause().getClass().getName().contains("persistence")) {
+ throw (RuntimeException) e.getCause().getCause();
}
}