Package io.grpc
Class StatusRuntimeException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- io.grpc.StatusRuntimeException
-
- All Implemented Interfaces:
java.io.Serializable
public class StatusRuntimeException extends java.lang.RuntimeException
Status
in RuntimeException form, for propagating Status information via exceptions.- See Also:
StatusException
, Serialized Form
-
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Throwable
fillInStackTrace()
Status
getStatus()
Returns the status code as aStatus
object.Metadata
getTrailers()
Returns the received trailers.
-
-
-
Constructor Detail
-
StatusRuntimeException
public StatusRuntimeException(Status status)
Constructs the exception with both a status. See alsoStatus.asRuntimeException()
.- Since:
- 1.0.0
-
StatusRuntimeException
public StatusRuntimeException(Status status, @Nullable Metadata trailers)
Constructs the exception with both a status and trailers. See alsoStatus.asRuntimeException(Metadata)
.- Since:
- 1.0.0
-
-
Method Detail
-
fillInStackTrace
public java.lang.Throwable fillInStackTrace()
- Overrides:
fillInStackTrace
in classjava.lang.Throwable
-
getTrailers
@Nullable public final Metadata getTrailers()
Returns the received trailers.- Since:
- 1.0.0
-
-