Top Description Fields Constructors Methods
io.grpc

public Class StatusException

extends Exception
Class Inheritance
Imports
javax.annotation.Nullable

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.

Field Summary

Modifier and TypeField and Description
private final boolean
private static final long
private final Status
private final Metadata

Constructor Summary

AccessConstructor and Description
public
StatusException(Status status)

Constructs an exception with both a status.

public
StatusException(Status status, Metadata trailers)

Constructs an exception with both a status and trailers.

pack-priv
StatusException(Status status, Metadata trailers, boolean fillInStackTrace)

Method Summary

Modifier and TypeMethod and Description
public synchronized Throwable
fillInStackTrace()

Overrides java.lang.Throwable.fillInStackTrace.

Fills in the execution stack trace.
public final Status
getStatus()

Returns the status code as a Status object.

public final Metadata
getTrailers()

Returns the received trailers.

Field Detail

fillInStackTraceback to summary
private final boolean fillInStackTrace
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.Exception.serialVersionUID.

statusback to summary
private final Status status
trailersback to summary
private final Metadata trailers

Constructor Detail

StatusExceptionback to summary
public StatusException(Status status)

Constructs an exception with both a status. See also Status#asException().

Since
1.0.0
StatusExceptionback to summary
public StatusException(Status status, Metadata trailers)

Constructs an exception with both a status and trailers. See also Status#asException(Metadata).

Since
1.0.0
StatusExceptionback to summary
pack-priv StatusException(Status status, Metadata trailers, boolean fillInStackTrace)

Method Detail

fillInStackTraceback to summary
public synchronized Throwable fillInStackTrace()

Overrides java.lang.Throwable.fillInStackTrace.

Doc from java.lang.Throwable.fillInStackTrace.

Fills in the execution stack trace. This method records within this Throwable object information about the current state of the stack frames for the current thread.

If the stack trace of this Throwable is not writable, calling this method has no effect.

Returns:Throwable

a reference to this Throwable instance.

Annotations
@Override
getStatusback to summary
public final Status getStatus()

Returns the status code as a Status object.

Since
1.0.0
getTrailersback to summary
public final Metadata getTrailers()

Returns the received trailers.

Since
1.0.0