diff --git a/muscript/src/main/java/io/gitlab/jfronny/muscript/ast/dynamic/Call.java b/muscript/src/main/java/io/gitlab/jfronny/muscript/ast/dynamic/Call.java index 8ed608b..4282f59 100644 --- a/muscript/src/main/java/io/gitlab/jfronny/muscript/ast/dynamic/Call.java +++ b/muscript/src/main/java/io/gitlab/jfronny/muscript/ast/dynamic/Call.java @@ -5,6 +5,7 @@ import io.gitlab.jfronny.muscript.annotations.CanThrow; import io.gitlab.jfronny.muscript.annotations.UncheckedDynamic; import io.gitlab.jfronny.muscript.data.Scope; import io.gitlab.jfronny.muscript.data.dynamic.*; +import io.gitlab.jfronny.muscript.error.LocationalException; import java.util.*; import java.util.stream.Stream; @@ -30,6 +31,8 @@ public class Call extends DynamicExpr { .apply(DFinal.of(args.stream().flatMap(e -> e.get(dataRoot)).toArray(Dynamic[]::new))); } catch (DynamicTypeConversionException e) { throw e.locational(chStart, chEnd); + } catch (RuntimeException e) { + throw new LocationalException(chStart, chEnd, "Could not perform call successfully", e); } }