diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-24 15:07:29 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-24 15:07:29 +0700 |
commit | b72579c4b1200459f959bcd6a25364e239420573 (patch) | |
tree | 5e566cc2b7972cd8ccebece92d879bddc800393d /crypto/src/pkcs | |
parent | Remove certpath from PkixCertPathValidatorException (diff) | |
download | BouncyCastle.NET-ed25519-b72579c4b1200459f959bcd6a25364e239420573.tar.xz |
Cleanup Exception classes
Diffstat (limited to 'crypto/src/pkcs')
-rw-r--r-- | crypto/src/pkcs/PkcsException.cs | 36 | ||||
-rw-r--r-- | crypto/src/pkcs/PkcsIOException.cs | 35 |
2 files changed, 47 insertions, 24 deletions
diff --git a/crypto/src/pkcs/PkcsException.cs b/crypto/src/pkcs/PkcsException.cs index 7a69ff736..ba296882c 100644 --- a/crypto/src/pkcs/PkcsException.cs +++ b/crypto/src/pkcs/PkcsException.cs @@ -1,21 +1,31 @@ using System; +using System.Runtime.Serialization; namespace Org.BouncyCastle.Pkcs { - /// <summary> - /// Base exception for PKCS related issues. - /// </summary> - public class PkcsException + /// <summary>Base exception for PKCS related issues.</summary> + [Serializable] + public class PkcsException : Exception { - public PkcsException(string message) - : base(message) - { - } + public PkcsException() + : base() + { + } - public PkcsException(string message, Exception underlying) - : base(message, underlying) - { - } - } + public PkcsException(string message) + : base(message) + { + } + + public PkcsException(string message, Exception innerException) + : base(message, innerException) + { + } + + protected PkcsException(SerializationInfo info, StreamingContext context) + : base(info, context) + { + } + } } diff --git a/crypto/src/pkcs/PkcsIOException.cs b/crypto/src/pkcs/PkcsIOException.cs index 889b0fcb0..4523ac286 100644 --- a/crypto/src/pkcs/PkcsIOException.cs +++ b/crypto/src/pkcs/PkcsIOException.cs @@ -1,19 +1,32 @@ using System; using System.IO; +using System.Runtime.Serialization; namespace Org.BouncyCastle.Pkcs { - /// <summary> - /// Base exception for parsing related issues in the PKCS namespace. - /// </summary> - public class PkcsIOException: IOException + /// <summary>Base exception for parsing related issues in the PKCS namespace.</summary> + [Serializable] + public class PkcsIOException + : IOException { - public PkcsIOException(string message) : base(message) - { - } + public PkcsIOException() + : base() + { + } - public PkcsIOException(string message, Exception underlying) : base(message, underlying) - { - } - } + public PkcsIOException(string message) + : base(message) + { + } + + public PkcsIOException(string message, Exception innerException) + : base(message, innerException) + { + } + + protected PkcsIOException(SerializationInfo info, StreamingContext context) + : base(info, context) + { + } + } } |