add mod name to js print() (#1677)

* add mod name to js print()

* add mod name to errors
This commit is contained in:
Anuken
2020-03-05 15:58:10 -05:00
committed by GitHub
parent 0534a4da45
commit 89a5c957fd
2 changed files with 4 additions and 1 deletions

View File

@@ -91,6 +91,9 @@ public class Scripts implements Disposable{
context.evaluateString(scope, script, file, 1, null);
return true;
}catch(Throwable t){
if(currentMod != null){
file = currentMod.name + "/" + file;
}
log(LogLevel.err, file, "" + getError(t));
return false;
}