Made the exception itself visible
This commit is contained in:
parent
6a456c20e8
commit
e6dd2ff979
1 changed files with 7 additions and 4 deletions
|
@ -23,10 +23,13 @@ public class ExceptionListener implements Listener {
|
||||||
sb.append(sourcemessage).append("\n");
|
sb.append(sourcemessage).append("\n");
|
||||||
sb.append("```").append("\n");
|
sb.append("```").append("\n");
|
||||||
String stackTrace = Arrays.stream(ExceptionUtils.getStackTrace(e).split("\\n"))
|
String stackTrace = Arrays.stream(ExceptionUtils.getStackTrace(e).split("\\n"))
|
||||||
.filter(s -> !(s.contains("java.util") || s.contains("java.lang")
|
.filter(s -> !(s.contains(" at ") && ( //
|
||||||
|| s.contains("net.minecraft.server") || s.contains("sun.reflect")
|
s.contains("java.util") //
|
||||||
|| s.contains("org.bukkit")))
|
|| s.contains("java.lang") //
|
||||||
.collect(Collectors.joining("\n"));
|
|| s.contains("net.minecraft.server") //
|
||||||
|
|| s.contains("sun.reflect") //
|
||||||
|
|| s.contains("org.bukkit") //
|
||||||
|
))).collect(Collectors.joining("\n"));
|
||||||
if (stackTrace.length() > 1800)
|
if (stackTrace.length() > 1800)
|
||||||
stackTrace = stackTrace.substring(0, 1800);
|
stackTrace = stackTrace.substring(0, 1800);
|
||||||
sb.append(stackTrace).append("\n");
|
sb.append(stackTrace).append("\n");
|
||||||
|
|
Loading…
Reference in a new issue