Package org.hyperledger.fabric.gateway
Class ContractException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.hyperledger.fabric.gateway.GatewayException
org.hyperledger.fabric.gateway.ContractException
- All Implemented Interfaces:
Serializable
Thrown when an error occurs invoking a smart contract.
- See Also:
-
Constructor Summary
ConstructorDescriptionContractException
(String message) Constructs a new exception with the specified detail message.ContractException
(String message, Throwable cause) Constructs a new exception with the specified detail message and cause.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. -
Method Summary
Modifier and TypeMethodDescriptionCollection<org.hyperledger.fabric.sdk.ProposalResponse>
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.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ContractException
Constructs a new exception with the specified detail message. The cause and payload are not initialized.- Parameters:
message
- the detail message.
-
ContractException
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(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.- Parameters:
message
- the detail message.proposalResponses
- the proposal responses.
-
-
Method Details
-
getProposalResponses
Get the proposal responses received from peer invocations.- Returns:
- the proposal responses.
-
setProposalResponses
public void setProposalResponses(Collection<org.hyperledger.fabric.sdk.ProposalResponse> proposalResponses) Set the proposal responses received from peer invocations.- Parameters:
proposalResponses
- the proposal responses.
-