Error Handling#
Epicrypt provides a capability-aware exception hierarchy under:
Infocyph\\Epicrypt\\Exception
Root#
EpicryptException
Main Capability Exceptions#
Exception\\Crypto\\CryptoExceptionException\\Token\\TokenExceptionException\\Password\\PasswordExceptionException\\Integrity\\IntegrityExceptionFileAccessExceptionConfigurationException
Important Specialized Exceptions#
Crypto:
EncryptionExceptionDecryptionExceptionInvalidKeyExceptionInvalidNonceExceptionSignatureExceptionIntegrityCheckFailedException
Token:
InvalidTokenExceptionExpiredTokenExceptionInvalidClaimExceptionUnsupportedAlgorithmExceptionKeyResolutionException
Password:
InvalidPasswordExceptionPasswordHashExceptionSecretProtectionException
Integrity:
HashingException
Recommended Catch Strategy#
Catch specific capability exceptions when handling expected failures.
Catch
EpicryptExceptionat service boundaries for centralized error mapping.Avoid broad
Throwablecatch unless you rethrow as domain-specific errors.