Skip to content
This repository was archived by the owner on Mar 31, 2019. It is now read-only.

Commit 5ff9973

Browse files
authored
Merge pull request #256 from cristal-ise/Issue255_Improve_logging_of_script_errors
Improve logging of script errors: log script name
2 parents 32d13e3 + ccecc0e commit 5ff9973

File tree

1 file changed

+3
-1
lines changed
  • src/main/java/org/cristalise/kernel/scripting

1 file changed

+3
-1
lines changed

src/main/java/org/cristalise/kernel/scripting/Script.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,8 +594,10 @@ public Object execute() throws ScriptingEngineException {
594594
//Logger.msg(7, "Script.execute("+getName()+") - script returned '" + returnValue + "'");
595595
}
596596
catch (ScriptException ex) {
597+
final String msg = "Error executing script " + getName() + ": " + ex.getCause().getMessage();
598+
Logger.error(msg);
597599
Logger.error(ex.getCause());
598-
throw new ScriptingEngineException("Error executing script "+getName()+": " + ex.getCause().getMessage(), ex.getCause());
600+
throw new ScriptingEngineException(msg, ex.getCause());
599601
}
600602

601603
return packScriptReturnValue(returnValue);

0 commit comments

Comments
 (0)