what-the-bank/sources/io/grpc/StatusException.java

43 lines
1.2 KiB
Java

package io.grpc;
/* loaded from: classes6.dex */
public class StatusException extends Exception {
private static final long serialVersionUID = -660954903976144640L;
private final boolean fillInStackTrace;
private final Status status;
private final Metadata trailers;
public StatusException(Status status) {
this(status, null);
}
public StatusException(Status status, Metadata metadata) {
this(status, metadata, true);
}
StatusException(Status status, Metadata metadata, boolean z) {
super(Status.formatThrowableMessage(status), status.getCause());
this.status = status;
this.trailers = metadata;
this.fillInStackTrace = z;
fillInStackTrace();
}
@Override // java.lang.Throwable
public Throwable fillInStackTrace() {
Throwable fillInStackTrace;
synchronized (this) {
fillInStackTrace = this.fillInStackTrace ? super.fillInStackTrace() : this;
}
return fillInStackTrace;
}
public final Metadata getTrailers() {
return this.trailers;
}
public final Status getStatus() {
return this.status;
}
}