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

refs 2352
parent 074a9904
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,7 @@ import org.fortiss.tooling.kernel.service.ITransformationService;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: D5FFA34D4F541675F1EF17EE4A5C59CA
* @ConQAT.Rating YELLOW Hash: 8B88DE0F53EE7561C069D2660CF31843
*/
public final class TransformationUtils {
......@@ -132,4 +132,18 @@ public final class TransformationUtils {
ITransformationContext context) {
return ITransformationService.INSTANCE.canTransform(sourceElement, targetClass, context);
}
/**
* @param e
* @return the deepest non-null cause of <code>e</code>
*/
public static Throwable getOriginalCause(ChainTransformationFailedException e) {
Throwable f = e.getCause();
Throwable previous = e;
while(f != null) {
previous = f;
f = f.getCause();
}
return previous;
}
}
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