org.hyperledger.fabric.gateway

## 类 ContractException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - org.hyperledger.fabric.gateway.GatewayException
      - - org.hyperledger.fabric.gateway.ContractException

- 所有已实现的接口:
    Serializable

      public class ContractException
      extends GatewayException

  Thrown when an error occurs invoking a smart contract.
  另请参阅:
    序列化表格

- - ### 构造器概要

    构造器
    构造器和说明
    `ContractException(String message)` Constructs a new exception with the specified detail message.
    `ContractException(String message, Collection<org.hyperledger.fabric.sdk.ProposalResponse> proposalResponses)` Constructs a new exception with the specified detail message and proposal responses returned from peer invocations.
    `ContractException(String message, Throwable cause)` Constructs a new exception with the specified detail message and cause.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `Collection<org.hyperledger.fabric.sdk.ProposalResponse>` | `getProposalResponses()` Get the proposal responses received from peer invocations.
    `void` | `setProposalResponses(Collection<org.hyperledger.fabric.sdk.ProposalResponse> proposalResponses)` Set the proposal responses received from peer invocations.

    - ### 从类继承的方法 java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

    - ### 从类继承的方法 java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 构造器详细资料

    - #### ContractException

          public ContractException(String message)

      Constructs a new exception with the specified detail message. The cause and payload are not initialized.
      参数:
        `message` - the detail message.

    - #### ContractException

          public ContractException(String message,
                                   Throwable cause)

      Constructs a new exception with the specified detail message and cause. The payload is not initialized.
      参数:
        `message` - the detail message.
        `cause` - the cause.

    - #### ContractException

          public ContractException(String message,
                                   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.
      参数:
        `message` - the detail message.
        `proposalResponses` - the proposal responses.

  - ### 方法详细资料

    - #### getProposalResponses

          public Collection<org.hyperledger.fabric.sdk.ProposalResponse> getProposalResponses()

      Get the proposal responses received from peer invocations.
      返回:
        the proposal responses.

    - #### setProposalResponses

          public void setProposalResponses(Collection<org.hyperledger.fabric.sdk.ProposalResponse> proposalResponses)

      Set the proposal responses received from peer invocations.
      参数:
        `proposalResponses` - the proposal responses.

Copyright © 2023. All rights reserved.