public final class GrpcStatusException
extends RuntimeException
GrpcStatus in exception form.| Constructor and Description |
|---|
GrpcStatusException(GrpcStatus status)
Constructs an instance with the given
GrpcStatus. |
GrpcStatusException(GrpcStatus status,
Throwable cause)
Constructs an instance with the given
GrpcStatus. |
| Modifier and Type | Method and Description |
|---|---|
Status |
applicationStatus()
Returns the status details if any was included or
null. |
static GrpcStatusException |
fromThrowable(Throwable t)
Translates a
Throwable into a GrpcStatusException. |
static GrpcStatusException |
of(Status status)
Returns a new
GrpcStatusException for the given Status. |
GrpcStatus |
status()
Returns the wrapped
GrpcStatus. |
public GrpcStatusException(GrpcStatus status)
GrpcStatus.status - status to be wrapped.public GrpcStatusException(GrpcStatus status, Throwable cause)
GrpcStatus.status - status to be wrapped.cause - the cause of this exception.public GrpcStatus status()
GrpcStatus.GrpcStatus.@Nullable public Status applicationStatus()
null.Status.public static GrpcStatusException of(Status status)
GrpcStatusException for the given Status.status - the statuspublic static GrpcStatusException fromThrowable(Throwable t)
Throwable into a GrpcStatusException.t - the throwable.GrpcStatusException with mapped GrpcStatus or GrpcStatusCode.UNKNOWN
status with the throwable as the cause.