All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cc.youchain.protocol.exceptions.TransactionException Maven / Gradle / Ivy

There is a newer version: 1.1.5
Show newest version
package cc.youchain.protocol.exceptions;

import java.util.Optional;

/**
 * Transaction timeout exception indicates that we have breached some threshold waiting for a
 * transaction to execute.
 */
public class TransactionException extends Exception {

    private Optional transactionHash = Optional.empty();

    public TransactionException(String message) {
        super(message);
    }

    public TransactionException(String message, String transactionHash) {
        super(message);
        this.transactionHash = Optional.ofNullable(transactionHash);
    }

    public TransactionException(Throwable cause) {
        super(cause);
    }

    /**
     * Obtain the transaction hash .
     * @return optional transaction hash .
     */
    public Optional getTransactionHash() {
        return transactionHash;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy