More informative errors when evaluating javascript files
This commit is contained in:
parent
a8f0d0bdf9
commit
68f8acd922
1 changed files with 5 additions and 1 deletions
|
@ -56,7 +56,11 @@ var verbose = verbose || false;
|
||||||
var reader = new java.io.FileReader(file);
|
var reader = new java.io.FileReader(file);
|
||||||
__engine.put("__script",canonizedFilename);
|
__engine.put("__script",canonizedFilename);
|
||||||
__engine.put("__folder",(parent?_canonize(parent):"")+"/");
|
__engine.put("__folder",(parent?_canonize(parent):"")+"/");
|
||||||
result = __engine.eval(reader);
|
try{
|
||||||
|
result = __engine.eval(reader);
|
||||||
|
}catch (e){
|
||||||
|
__plugin.logger.severe("Error evaluating " + filename + ", " + e );
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
if (warnOnFileNotFound)
|
if (warnOnFileNotFound)
|
||||||
__plugin.logger.warning(canonizedFilename + " not found");
|
__plugin.logger.warning(canonizedFilename + " not found");
|
||||||
|
|
Reference in a new issue