Better server colors

This commit is contained in:
Anuken
2020-10-20 11:21:47 -04:00
parent 9060a9518a
commit 9ab272a01f
15 changed files with 176 additions and 119 deletions

View File

@@ -59,12 +59,12 @@ public class Scripts implements Disposable{
if(o instanceof Undefined) o = "undefined";
return String.valueOf(o);
}catch(Throwable t){
return getError(t);
return getError(t, false);
}
}
private String getError(Throwable t){
t.printStackTrace();
private String getError(Throwable t, boolean log){
if(log) Log.err(t);
return t.getClass().getSimpleName() + (t.getMessage() == null ? "" : ": " + t.getMessage());
}
@@ -138,7 +138,7 @@ public class Scripts implements Disposable{
if(currentMod != null){
file = currentMod.name + "/" + file;
}
log(LogLevel.err, file, "" + getError(t));
log(LogLevel.err, file, "" + getError(t, true));
return false;
}
}