Skip to content

Commit

Permalink
Improved error messages for missing script context variables as per
Browse files Browse the repository at this point in the history
issue #632
  • Loading branch information
terrypacker committed Mar 14, 2016
1 parent 83b7d8b commit 428ed94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/src/com/serotonin/m2m2/rt/script/ScriptExecutor.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public Map<String, IDataPointValueSource> convertContext(List<IntStringPair> con
DataPointRT point = Common.runtimeManager.getDataPoint(contextEntry.getKey());
if (point == null)
throw new DataPointStateException(contextEntry.getKey(), new TranslatableMessage(
"event.meta.pointMissing"));
"event.meta.pointMissing", contextEntry.getValue(), contextEntry.getKey()));
converted.put(contextEntry.getValue(), point);
}

Expand All @@ -62,7 +62,7 @@ public static Map<String, IDataPointValueSource> convertScriptContext(List<Scrip
DataPointRT point = Common.runtimeManager.getDataPoint(contextEntry.getDataPointId());
if (point == null)
throw new DataPointStateException(contextEntry.getDataPointId(), new TranslatableMessage(
"event.meta.pointMissing"));
"event.meta.pointMissing", contextEntry.getVariableName(), contextEntry.getDataPointId()));
converted.put(contextEntry.getVariableName(), point);
}

Expand Down

0 comments on commit 428ed94

Please sign in to comment.