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
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
private Status
status
private Metadata
trailers
-
Constructor Summary
Constructors Constructor Description StatusRuntimeException(Status status)
Constructs the exception with a status.StatusRuntimeException(Status status, Metadata trailers)
Constructs the exception with both a status and trailers.StatusRuntimeException(Status status, Metadata trailers, boolean fillInStackTrace)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Status
getStatus()
Returns the status code as aStatus
object.Metadata
getTrailers()
Returns the received trailers.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
status
private final Status status
-
trailers
private final Metadata trailers
-
-
Constructor Detail
-
StatusRuntimeException
public StatusRuntimeException(Status status)
Constructs the exception with 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
-
-