X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Finternal%2Fcodegen%2Futils%2FValueFromMethod.java;h=70160dee2615b4e284e637134b1efcf7e03e84a5;hp=4efd2a8d404e7037925fd7d005d782e1fa5c8d3f;hb=51006ffec13cbf8e0d9c8b07212d69478e4bdd4e;hpb=fede738f59eeae3156c0f2f1df4dd9e99f28b3b1 diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/utils/ValueFromMethod.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/utils/ValueFromMethod.java index 4efd2a8d4..70160dee2 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/utils/ValueFromMethod.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/utils/ValueFromMethod.java @@ -1,5 +1,6 @@ package org.simantics.scl.compiler.internal.codegen.utils; +import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import org.simantics.scl.runtime.function.FunctionImpl1; @@ -26,6 +27,8 @@ public class ValueFromMethod { Object ret = method.invoke(null, p0); return returnsVoid ? Tuple0.INSTANCE : ret; } catch (ReflectiveOperationException e) { + if (e instanceof InvocationTargetException) + throw new RuntimeException(e.getCause()); throw new RuntimeException(e); } }