Package io.grpc

Class 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
    • 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

      • StatusRuntimeException

        public StatusRuntimeException​(Status status)
        Constructs the exception with both a status. See also Status.asException().
        Since:
        1.0.0
      • StatusRuntimeException

        public StatusRuntimeException​(Status status,
                                      @Nullable
                                      Metadata trailers)
        Constructs the exception with both a status and trailers. See also Status.asException(Metadata).
        Since:
        1.0.0
    • Method Detail

      • fillInStackTrace

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

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

        @Nullable
        public final Metadata getTrailers()
        Returns the received trailers.
        Since:
        1.0.0