Add try/catch block around method transformations
This commit is contained in:
@@ -58,6 +58,7 @@ public abstract class TransformationMethodVisitor extends MethodVisitor {
|
|||||||
|
|
||||||
super.visitEnd();
|
super.visitEnd();
|
||||||
|
|
||||||
|
try {
|
||||||
if (shouldBeTransformed(methodNode)) {
|
if (shouldBeTransformed(methodNode)) {
|
||||||
performTransformations(methodNode);
|
performTransformations(methodNode);
|
||||||
}
|
}
|
||||||
@@ -78,6 +79,10 @@ public abstract class TransformationMethodVisitor extends MethodVisitor {
|
|||||||
|
|
||||||
delegate.visitEnd();
|
delegate.visitEnd();
|
||||||
}
|
}
|
||||||
|
catch (Throwable t) {
|
||||||
|
throw new CompilationException("Couldn't transform method node: " + InlineCodegenUtil.getNodeText(methodNode), t, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected abstract void performTransformations(@NotNull MethodNode methodNode);
|
protected abstract void performTransformations(@NotNull MethodNode methodNode);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user