mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-19 00:19:12 +00:00
Merge simon's changes to PrettyPrinter which include cause in stacktrace
This commit is contained in:
commit
38e8e5a951
1 file changed
+6
-2
@@ -683,8 +683,12 @@ public class PrettyPrinter {
|
||||
* @return fluent interface
|
||||
*/
|
||||
public PrettyPrinter add(Throwable th, int indent) {
|
||||
this.add("%s: %s", th.getClass().getName(), th.getMessage());
|
||||
return this.add(th.getStackTrace(), indent);
|
||||
while (th != null) {
|
||||
this.add("%s: %s", th.getClass().getName(), th.getMessage());
|
||||
this.add(th.getStackTrace(), indent);
|
||||
th = th.getCause();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user