public class StatusException
extends java.lang.Exception
Status in Exception form, for propagating Status information via exceptions. This is
semantically equivalent to StatusRuntimeException, except for usage in APIs that promote
checked exceptions. gRPC's stubs favor StatusRuntimeException.| Constructor and Description |
|---|
StatusException(Status status)
Constructs an exception with both a status.
|
StatusException(Status status,
Metadata trailers)
Constructs an exception with both a status and trailers.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Throwable |
fillInStackTrace() |
Status |
getStatus()
Returns the status code as a
Status object. |
Metadata |
getTrailers()
Returns the received trailers.
|
public StatusException(Status status)
Status.asException().public StatusException(Status status, @Nullable Metadata trailers)
Status.asException(Metadata).public java.lang.Throwable fillInStackTrace()
fillInStackTrace in class java.lang.Throwablepublic final Metadata getTrailers()