Package io.grpc

Class StatusException

  • All Implemented Interfaces:

    public class StatusException
    extends java.lang.Exception
    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:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Throwable fillInStackTrace()  
      Status getStatus()
      Returns the status code as a Status object.
      Metadata getTrailers()
      Returns the received trailers.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • StatusException

        public StatusException​(Status status)
        Constructs an exception with both a status. See also Status.asException().
    • Method Detail

      • fillInStackTrace

        public java.lang.Throwable fillInStackTrace()
        fillInStackTrace in class java.lang.Throwable
      • getStatus

        public final Status getStatus()
        Returns the status code as a Status object.
      • getTrailers

        public final Metadata getTrailers()
        Returns the received trailers.