Skip to content

Commit

Permalink
Uses the proper function name in the error messages
Browse files Browse the repository at this point in the history
Fixes #3883
  • Loading branch information
emmebi committed Apr 11, 2023
1 parent bfe5681 commit db143a3
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit db143a3

Please sign in to comment.