From 796c36aeac5ed0f9f2617264a04bfea111c9bf01 Mon Sep 17 00:00:00 2001
From: Vincent Aravantinos <aravantinos@fortiss.org>
Date: Fri, 15 Apr 2016 16:09:45 +0000
Subject: [PATCH] moves ErrorEmbeddingException to utils refs 2553

---
 .../tooling/kernel/utils/ConstraintsUtils.java     | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/ConstraintsUtils.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/ConstraintsUtils.java
index 4eeaa8dca..d1948bae9 100644
--- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/ConstraintsUtils.java
+++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/ConstraintsUtils.java
@@ -17,6 +17,7 @@ $Id$
 +--------------------------------------------------------------------------*/
 package org.fortiss.tooling.kernel.utils;
 
+import org.fortiss.tooling.kernel.model.constraints.ErrorVerificationStatus;
 import org.fortiss.tooling.kernel.model.constraints.IConstrained;
 
 /**
@@ -36,4 +37,17 @@ public class ConstraintsUtils {
 	public static boolean containsConstraintOfType(IConstrained c, Class<?> clazz) {
 		return !EcoreUtils.pickInstanceOf(clazz, c.getConstraints()).isEmpty();
 	}
+
+	/** Exception which embeds an error. */
+	public static class ErrorEmbeddingException extends RuntimeException {
+
+		/** The embedded error. */
+		public ErrorVerificationStatus error;
+
+		/** Constructor. */
+		public ErrorEmbeddingException(ErrorVerificationStatus error) {
+			super();
+			this.error = error;
+		}
+	}
 }
-- 
GitLab