summary refs log tree commit diff
path: root/crypto/src/cms
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-06-24 15:07:29 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-06-24 15:07:29 +0700
commitb72579c4b1200459f959bcd6a25364e239420573 (patch)
tree5e566cc2b7972cd8ccebece92d879bddc800393d /crypto/src/cms
parentRemove certpath from PkixCertPathValidatorException (diff)
downloadBouncyCastle.NET-ed25519-b72579c4b1200459f959bcd6a25364e239420573.tar.xz
Cleanup Exception classes
Diffstat (limited to 'crypto/src/cms')
-rw-r--r--crypto/src/cms/CMSAttributeTableGenerationException.cs34
-rw-r--r--crypto/src/cms/CMSException.cs20
-rw-r--r--crypto/src/cms/CMSStreamException.cs30
3 files changed, 45 insertions, 39 deletions
diff --git a/crypto/src/cms/CMSAttributeTableGenerationException.cs b/crypto/src/cms/CMSAttributeTableGenerationException.cs

index 692be2804..977d60e5c 100644 --- a/crypto/src/cms/CMSAttributeTableGenerationException.cs +++ b/crypto/src/cms/CMSAttributeTableGenerationException.cs
@@ -1,28 +1,30 @@ using System; +using System.Runtime.Serialization; namespace Org.BouncyCastle.Cms { -#if !PORTABLE [Serializable] -#endif public class CmsAttributeTableGenerationException : CmsException { - public CmsAttributeTableGenerationException() - { - } + public CmsAttributeTableGenerationException() + : base() + { + } - public CmsAttributeTableGenerationException( - string name) - : base(name) - { - } + public CmsAttributeTableGenerationException(string message) + : base(message) + { + } - public CmsAttributeTableGenerationException( - string name, - Exception e) - : base(name, e) - { - } + public CmsAttributeTableGenerationException(string message, Exception innerException) + : base(message, innerException) + { + } + + protected CmsAttributeTableGenerationException(SerializationInfo info, StreamingContext context) + : base(info, context) + { + } } } diff --git a/crypto/src/cms/CMSException.cs b/crypto/src/cms/CMSException.cs
index 83de3f00e..eab32f916 100644 --- a/crypto/src/cms/CMSException.cs +++ b/crypto/src/cms/CMSException.cs
@@ -1,27 +1,29 @@ using System; +using System.Runtime.Serialization; namespace Org.BouncyCastle.Cms { -#if !PORTABLE [Serializable] -#endif public class CmsException : Exception { public CmsException() + : base() { } - public CmsException( - string msg) - : base(msg) + public CmsException(string message) + : base(message) { } - public CmsException( - string msg, - Exception e) - : base(msg, e) + public CmsException(string message, Exception innerException) + : base(message, innerException) + { + } + + protected CmsException(SerializationInfo info, StreamingContext context) + : base(info, context) { } } diff --git a/crypto/src/cms/CMSStreamException.cs b/crypto/src/cms/CMSStreamException.cs
index c3b0f9621..42ae409f7 100644 --- a/crypto/src/cms/CMSStreamException.cs +++ b/crypto/src/cms/CMSStreamException.cs
@@ -1,29 +1,31 @@ using System; using System.IO; +using System.Runtime.Serialization; namespace Org.BouncyCastle.Cms { -#if !PORTABLE [Serializable] -#endif public class CmsStreamException : IOException { public CmsStreamException() + : base() { } - public CmsStreamException( - string name) - : base(name) - { - } + public CmsStreamException(string message) + : base(message) + { + } - public CmsStreamException( - string name, - Exception e) - : base(name, e) - { - } - } + public CmsStreamException(string message, Exception innerException) + : base(message, innerException) + { + } + + protected CmsStreamException(SerializationInfo info, StreamingContext context) + : base(info, context) + { + } + } }