From db143a365388cc26adbb87ed19de309d75a1f5d7 Mon Sep 17 00:00:00 2001 From: emmebi Date: Tue, 11 Apr 2023 22:16:00 +0100 Subject: [PATCH] Uses the proper function name in the error messages Fixes #3883 --- .../client/functions/Topology_Functions.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/main/java/net/rptools/maptool/client/functions/Topology_Functions.java b/src/main/java/net/rptools/maptool/client/functions/Topology_Functions.java index e7c417f1b1..03e77cabb0 100644 --- a/src/main/java/net/rptools/maptool/client/functions/Topology_Functions.java +++ b/src/main/java/net/rptools/maptool/client/functions/Topology_Functions.java @@ -354,20 +354,18 @@ private JsonArray childEvaluateGetTokenTopology( if (token == null) { throw new ParserException( I18N.getText( - "macro.function.general.unknownToken", - "getTokenVBL", - parameters.get(0).toString())); + "macro.function.general.unknownToken", functionName, parameters.get(0).toString())); } } else if (parameters.size() == 0) { MapToolVariableResolver res = (MapToolVariableResolver) resolver; token = res.getTokenInContext(); if (token == null) { throw new ParserException( - I18N.getText("macro.function.general.noImpersonated", "getTokenVBL")); + I18N.getText("macro.function.general.noImpersonated", functionName)); } } else { throw new ParserException( - I18N.getText("macro.function.general.tooManyParam", "getTokenVBL", 1, parameters.size())); + I18N.getText("macro.function.general.tooManyParam", functionName, 1, parameters.size())); } JsonArray allShapes = new JsonArray(); @@ -437,7 +435,7 @@ private int childEvaluateSetTokenTopology( } if (token == null) { throw new ParserException( - I18N.getText("macro.function.general.noImpersonated", "getTokenVBL")); + I18N.getText("macro.function.general.noImpersonated", functionName)); } Area tokenTopology = new Area(); @@ -525,9 +523,7 @@ private void childEvaluateTransferTopology( if (token == null) { throw new ParserException( I18N.getText( - "macro.function.general.unknownToken", - "getTokenVBL", - parameters.get(0).toString())); + "macro.function.general.unknownToken", functionName, parameters.get(0).toString())); } } else { MapToolVariableResolver res = (MapToolVariableResolver) resolver;