mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 11:57:29 +00:00
Full console output is now shown again for script errors.
This commit is contained in:
1 parent
69d4fb20ff
commit
ff810cbc8d
1 file changed
+2
-26
@@ -104,19 +104,7 @@ public class ScriptContainer {
|
||||
var14.printStackTrace(pw);
|
||||
} finally {
|
||||
String errorString = sw.getBuffer().toString().trim();
|
||||
int startIndex = 0;
|
||||
if(!errorString.isEmpty()) {
|
||||
String endString = "in <eval> at line number ";
|
||||
startIndex = errorString.indexOf(endString) + endString.length();
|
||||
|
||||
for (int i = startIndex; i < errorString.length(); i++) {
|
||||
if (!Character.isDigit(errorString.charAt(i))) {
|
||||
startIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.appandConsole(errorString.substring(0, startIndex));
|
||||
this.appandConsole(errorString);
|
||||
pw.close();
|
||||
}
|
||||
}
|
||||
@@ -157,19 +145,7 @@ public class ScriptContainer {
|
||||
var14.printStackTrace(pw);
|
||||
} finally {
|
||||
String errorString = sw.getBuffer().toString().trim();
|
||||
int startIndex = 0;
|
||||
if(!errorString.isEmpty()) {
|
||||
String endString = "in <eval> at line number ";
|
||||
startIndex = errorString.indexOf(endString) + endString.length();
|
||||
|
||||
for (int i = startIndex; i < errorString.length(); i++) {
|
||||
if (!Character.isDigit(errorString.charAt(i))) {
|
||||
startIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.appandConsole(errorString.substring(0, startIndex));
|
||||
this.appandConsole(errorString);
|
||||
pw.close();
|
||||
Current = null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user