Package io.grpc
Class StatusException
java.lang.Object
java.lang.Throwable
java.lang.Exception
io.grpc.StatusException
- All Implemented Interfaces:
Serializable
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
.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionStatusException
(Status status) Constructs an exception with both a status.StatusException
(Status status, Metadata trailers) Constructs an exception with both a status and trailers. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
StatusException
Constructs an exception with both a status. See alsoStatus.asException()
.- Since:
- 1.0.0
-
StatusException
Constructs an exception with both a status and trailers. See alsoStatus.asException(Metadata)
.- Since:
- 1.0.0
-
-
Method Details
-
getStatus
Returns the status code as aStatus
object.- Since:
- 1.0.0
-
getTrailers
Returns the received trailers.- Since:
- 1.0.0
-