Class GrpcException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.codename1.backend.grpc.GrpcException
A failed gRPC call: a status code other than GrpcStatus.OK and the
message that goes with it.
A server handler throws it to end a call with that status; the client throws
it when a call ends with one. Any other exception a handler throws is
reported to the caller as GrpcStatus.UNKNOWN with no message, so that an
internal error text never leaks to a peer by accident.
-
Constructor Summary
ConstructorsConstructorDescriptionGrpcException(int status, String message) GrpcException(int status, String message, Throwable cause) -
Method Summary
Methods inherited from class Throwable
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
GrpcException
- Parameters:
status- a gRPC status code, seeGrpcStatusmessage- the human-readable status message, may be null
-
GrpcException
- Parameters:
status- a gRPC status code, seeGrpcStatusmessage- the human-readable status message, may be nullcause- the underlying failure
-
-
Method Details
-
getStatus
public int getStatus()- Returns:
- the gRPC status code
-
toString
Description copied from class:ThrowableReturns a short description of this Throwable object. If this Throwable object was with an error message string, then the result is the concatenation of three strings: The name of the actual class of this object ": " (a colon and a space) The result of the method for this object If this Throwable object was with no error message string, then the name of the actual class of this object is returned.
-