public class StatusRuntimeException extends RuntimeException
Status
in RuntimeException form, for propagating Status information via exceptions.StatusException
,
Serialized FormConstructor and Description |
---|
StatusRuntimeException(Status status)
Constructs the exception with both a status.
|
StatusRuntimeException(Status status,
Metadata trailers)
Constructs the exception with both a status and trailers.
|
Modifier and Type | Method and Description |
---|---|
Throwable |
fillInStackTrace() |
Status |
getStatus()
Returns the status code as a
Status object. |
Metadata |
getTrailers()
Returns the received trailers.
|
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public StatusRuntimeException(Status status)
Status.asException()
.public StatusRuntimeException(Status status, @Nullable Metadata trailers)
Status.asException(Metadata)
.public Throwable fillInStackTrace()
fillInStackTrace
in class Throwable