Class GatewayException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.hyperledger.fabric.client.GatewayException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
TransactionException

public class GatewayException extends Exception
Thrown if an error is encountered while invoking gRPC services on a gateway peer. Since the gateway delegates much of the processing to other nodes (endorsing peers and orderers), then the error could have originated from one or more of those nodes. In that case, the details will contain errors information from those nodes.
See Also:
  • Constructor Details

    • GatewayException

      public GatewayException(StatusRuntimeException cause)
      Constructs a new exception with the specified cause.
      Parameters:
      cause - the cause.
  • Method Details

    • getStatus

      public Status getStatus()
      Returns the status code as a gRPC Status object.
      Returns:
      gRPC call status.
    • getDetails

      public List<org.hyperledger.fabric.protos.gateway.ErrorDetail> getDetails()
      Get the gRPC error details returned by a gRPC invocation failure.
      Returns:
      error details.
    • printStackTrace

      public void printStackTrace()
      This implementation appends any gRPC error details to the stack trace.
      Overrides:
      printStackTrace in class Throwable
    • printStackTrace

      public void printStackTrace(PrintStream out)
      This implementation appends any gRPC error details to the stack trace.
      Overrides:
      printStackTrace in class Throwable
    • printStackTrace

      public void printStackTrace(PrintWriter out)
      This implementation appends any gRPC error details to the stack trace.
      Overrides:
      printStackTrace in class Throwable