Package org.bouncycastle.operator
Class OperatorException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.bouncycastle.operator.OperatorException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
OperatorCreationException
public class OperatorException extends java.lang.ExceptionBase checked exception for failures originating in theorg.bouncycastle.operatorabstraction layer — the bridge between BC's JCA-free high-level packages (org.bouncycastle.cms,org.bouncycastle.cert,org.bouncycastle.pkcs, etc.) and their underlying JCA / lightweight implementations (org.bouncycastle.operator.jcajce/org.bouncycastle.operator.bc).Operators are the small, focused capability interfaces in this package —
ContentSigner,ContentVerifier,DigestCalculator,MacCalculator,KeyWrapper,OutputEncryptor, and so on — that callers obtain from concrete builders.OperatorException(and its subclasses) are the way those builders and the operators themselves report failure back to the high-level code, without that high-level code having to declarejava.security.*/javax.crypto.*checked exceptions in its API.Direct subclasses:
OperatorCreationException— thrown by an operator builder (e.g.JcaContentSignerBuilder,BcRSAContentSignerBuilder,JcaDigestCalculatorProviderBuilder) when it cannot produce the requested operator. Typical underlying causes include an unknown algorithm OID, an invalid key type for the requested algorithm, an unsupported parameter combination, or a missing / misconfigured JCA provider.OperatorStreamException— anIOExceptionsubclass thrown from inside an operator'sOutputStream.write/InputStream.readwhen the streaming method's signature only permitsIOException.RuntimeOperatorException— the unchecked variant used when an operator method has nothrowsclause to declare a checked exception on (for example methods overridingCloseable.close()).
Throwable.getCause().- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OperatorException(java.lang.String msg)Construct an exception with the supplied diagnostic message and no underlying cause.OperatorException(java.lang.String msg, java.lang.Throwable cause)Construct an exception with the supplied diagnostic message and the underlying cause (typically aGeneralSecurityException,IOException, or lightweightorg.bouncycastle.crypto.CryptoException) that triggered the failure.
-
-
-
Constructor Detail
-
OperatorException
public OperatorException(java.lang.String msg, java.lang.Throwable cause)Construct an exception with the supplied diagnostic message and the underlying cause (typically aGeneralSecurityException,IOException, or lightweightorg.bouncycastle.crypto.CryptoException) that triggered the failure.- Parameters:
msg- diagnostic message describing the failure.cause- the underlying exception that triggered the failure, ornullif this exception originates the failure itself.
-
OperatorException
public OperatorException(java.lang.String msg)
Construct an exception with the supplied diagnostic message and no underlying cause.- Parameters:
msg- diagnostic message describing the failure.
-
-