Class ContractException

  • All Implemented Interfaces:
    java.io.Serializable

    public class ContractException
    extends GatewayException
    Thrown when an error occurs invoking a smart contract.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ContractException​(java.lang.String message)
      Constructs a new exception with the specified detail message.
      ContractException​(java.lang.String message, java.lang.Throwable cause)
      Constructs a new exception with the specified detail message and cause.
      ContractException​(java.lang.String message, java.util.Collection<org.hyperledger.fabric.sdk.ProposalResponse> proposalResponses)
      Constructs a new exception with the specified detail message and proposal responses returned from peer invocations.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Collection<org.hyperledger.fabric.sdk.ProposalResponse> getProposalResponses()
      Get the proposal responses received from peer invocations.
      void setProposalResponses​(java.util.Collection<org.hyperledger.fabric.sdk.ProposalResponse> proposalResponses)
      Set the proposal responses received from peer invocations.
      • Methods inherited from class java.lang.Throwable

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

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

      • ContractException

        public ContractException​(java.lang.String message)
        Constructs a new exception with the specified detail message. The cause and payload are not initialized.
        Parameters:
        message - the detail message.
      • ContractException

        public ContractException​(java.lang.String message,
                                 java.lang.Throwable cause)
        Constructs a new exception with the specified detail message and cause. The payload is not initialized.
        Parameters:
        message - the detail message.
        cause - the cause.
      • ContractException

        public ContractException​(java.lang.String message,
                                 java.util.Collection<org.hyperledger.fabric.sdk.ProposalResponse> proposalResponses)
        Constructs a new exception with the specified detail message and proposal responses returned from peer invocations. The cause is not initialized.
        Parameters:
        message - the detail message.
        proposalResponses - the proposal responses.
    • Method Detail

      • getProposalResponses

        public java.util.Collection<org.hyperledger.fabric.sdk.ProposalResponse> getProposalResponses()
        Get the proposal responses received from peer invocations.
        Returns:
        the proposal responses.
      • setProposalResponses

        public void setProposalResponses​(java.util.Collection<org.hyperledger.fabric.sdk.ProposalResponse> proposalResponses)
        Set the proposal responses received from peer invocations.
        Parameters:
        proposalResponses - the proposal responses.