From 47c30f499b1029688683571f2845d56014897d2a Mon Sep 17 00:00:00 2001 From: JFronny Date: Sat, 4 Jun 2022 18:16:53 +0200 Subject: [PATCH] [muscript] Adjust Get.get exception --- .../main/java/io/gitlab/jfronny/muscript/compiler/expr/Get.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/muscript/src/main/java/io/gitlab/jfronny/muscript/compiler/expr/Get.java b/muscript/src/main/java/io/gitlab/jfronny/muscript/compiler/expr/Get.java index 0571e83..909ab93 100644 --- a/muscript/src/main/java/io/gitlab/jfronny/muscript/compiler/expr/Get.java +++ b/muscript/src/main/java/io/gitlab/jfronny/muscript/compiler/expr/Get.java @@ -23,6 +23,6 @@ public class Get extends Expr.ObjectExpr { } else if (left instanceof OList l) { return l.get(name.asNumberExpr().get(dataRoot, dataRoot).intValue()); } - throw new IllegalArgumentException("Name is not of a valid type"); + throw new IllegalArgumentException("The element to get value \"" + name.asStringExpr().get(dataRoot, dataRoot) + "\" from is not of a valid type"); } }