Skip to content
Snippets Groups Projects
Commit 796c36ae authored by Vincent Aravantinos's avatar Vincent Aravantinos
Browse files

moves ErrorEmbeddingException to utils

refs 2553
parent 82dc8473
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment