what-the-bank/sources/com/drew/lang/CompoundException.java

59 lines
1.5 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.drew.lang;
import java.io.PrintStream;
import java.io.PrintWriter;
/* loaded from: classes.dex */
public class CompoundException extends Exception {
private final Throwable a;
public CompoundException(String str) {
this(str, null);
}
public CompoundException(Throwable th) {
this(null, th);
}
private CompoundException(String str, Throwable th) {
super(str);
this.a = th;
}
@Override // java.lang.Throwable
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(super.toString());
if (this.a != null) {
sb.append("\n--- inner exception ---\n");
sb.append(this.a.toString());
}
return sb.toString();
}
@Override // java.lang.Throwable
public void printStackTrace(PrintStream printStream) {
super.printStackTrace(printStream);
if (this.a != null) {
printStream.println("--- inner exception ---");
this.a.printStackTrace(printStream);
}
}
@Override // java.lang.Throwable
public void printStackTrace(PrintWriter printWriter) {
super.printStackTrace(printWriter);
if (this.a != null) {
printWriter.println("--- inner exception ---");
this.a.printStackTrace(printWriter);
}
}
@Override // java.lang.Throwable
public void printStackTrace() {
if (this.a != null) {
System.err.println("--- inner exception ---");
}
}
}