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

com.jd.blockchain.ledger.IllegalTransactionException Maven / Gradle / Ivy

There is a newer version: 1.6.5.RELEASE
Show newest version
package com.jd.blockchain.ledger;

public class IllegalTransactionException extends RuntimeException {

	private static final long serialVersionUID = 6348921847690512944L;

	private TransactionState txState;

	public IllegalTransactionException(String message) {
		super(message);
		this.txState = TransactionState.SYSTEM_ERROR;
	}
	
	public IllegalTransactionException(String message, TransactionState txState) {
		super(message);
		assert TransactionState.SUCCESS != txState;
		this.txState = txState;
	}

	public IllegalTransactionException(String message, Throwable cause) {
		super(message, cause);
		this.txState = TransactionState.SYSTEM_ERROR;
	}

	public IllegalTransactionException(String message, Throwable cause, TransactionState txState) {
		super(message, cause);
		assert TransactionState.SUCCESS != txState;
		this.txState = txState;
	}

	public TransactionState getTxState() {
		return txState;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy