Package com.privatechain.core.exception
Class ConsensusException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.privatechain.core.exception.BlockchainException
com.privatechain.core.exception.ConsensusException
- All Implemented Interfaces:
Serializable
Thrown when a
ConsensusEngine encounters an
unrecoverable error during block production or validation.
Examples:
- PBFT cannot reach the required quorum (e.g., too many Byzantine nodes)
- PoA signer key is unavailable or corrupt
- Mining thread is interrupted mid-nonce-search
- Since:
- 1.0.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConsensusException(String message) Constructs aConsensusExceptionwith a detail message.ConsensusException(String message, Throwable cause) Constructs aConsensusExceptionwith a detail message and cause. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ConsensusException
Constructs aConsensusExceptionwith a detail message.- Parameters:
message- human-readable description of the consensus failure
-
ConsensusException
Constructs aConsensusExceptionwith a detail message and cause.- Parameters:
message- human-readable description of the consensus failurecause- the underlying exception (e.g., network timeout)
-