summary refs log tree commit diff
path: root/crypto/src/asn1
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/asn1
parentRemove certpath from PkixCertPathValidatorException (diff)
downloadBouncyCastle.NET-ed25519-b72579c4b1200459f959bcd6a25364e239420573.tar.xz
Cleanup Exception classes
Diffstat (limited to 'crypto/src/asn1')
-rw-r--r--crypto/src/asn1/Asn1Exception.cs17
-rw-r--r--crypto/src/asn1/Asn1ParsingException.cs17
2 files changed, 18 insertions, 16 deletions
diff --git a/crypto/src/asn1/Asn1Exception.cs b/crypto/src/asn1/Asn1Exception.cs
index 9e4afb49f..ae89bbcdc 100644
--- a/crypto/src/asn1/Asn1Exception.cs
+++ b/crypto/src/asn1/Asn1Exception.cs
@@ -1,11 +1,10 @@
 using System;
 using System.IO;
+using System.Runtime.Serialization;
 
 namespace Org.BouncyCastle.Asn1
 {
-#if !PORTABLE
     [Serializable]
-#endif
     public class Asn1Exception
 		: IOException
 	{
@@ -14,16 +13,18 @@ namespace Org.BouncyCastle.Asn1
 		{
 		}
 
-		public Asn1Exception(
-			string message)
+		public Asn1Exception(string message)
 			: base(message)
 		{
 		}
 
-		public Asn1Exception(
-			string		message,
-			Exception	exception)
-			: base(message, exception)
+		public Asn1Exception(string message, Exception innerException)
+			: base(message, innerException)
+		{
+		}
+
+		protected Asn1Exception(SerializationInfo info, StreamingContext context)
+			: base(info, context)
 		{
 		}
 	}
diff --git a/crypto/src/asn1/Asn1ParsingException.cs b/crypto/src/asn1/Asn1ParsingException.cs
index 294e4c2c9..2b54ae0a1 100644
--- a/crypto/src/asn1/Asn1ParsingException.cs
+++ b/crypto/src/asn1/Asn1ParsingException.cs
@@ -1,10 +1,9 @@
 using System;
+using System.Runtime.Serialization;
 
 namespace Org.BouncyCastle.Asn1
 {
-#if !PORTABLE
     [Serializable]
-#endif
     public class Asn1ParsingException
 		: InvalidOperationException
 	{
@@ -13,16 +12,18 @@ namespace Org.BouncyCastle.Asn1
 		{
 		}
 
-		public Asn1ParsingException(
-			string message)
+		public Asn1ParsingException(string message)
 			: base(message)
 		{
 		}
 
-		public Asn1ParsingException(
-			string		message,
-			Exception	exception)
-			: base(message, exception)
+		public Asn1ParsingException(string message, Exception innerException)
+			: base(message, innerException)
+		{
+		}
+
+		protected Asn1ParsingException(SerializationInfo info, StreamingContext context)
+			: base(info, context)
 		{
 		}
 	}