summary refs log tree commit diff
path: root/crypto/src/crypto/DataLengthException.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/crypto/DataLengthException.cs')
-rw-r--r--crypto/src/crypto/DataLengthException.cs51
1 files changed, 22 insertions, 29 deletions
diff --git a/crypto/src/crypto/DataLengthException.cs b/crypto/src/crypto/DataLengthException.cs

index 5dde879d1..909639144 100644 --- a/crypto/src/crypto/DataLengthException.cs +++ b/crypto/src/crypto/DataLengthException.cs
@@ -1,42 +1,35 @@ using System; +using System.Runtime.Serialization; namespace Org.BouncyCastle.Crypto { - /** - * this exception is thrown if a buffer that is meant to have output - * copied into it turns out to be too short, or if we've been given - * insufficient input. In general this exception will Get thrown rather - * than an ArrayOutOfBounds exception. - */ -#if !PORTABLE - [Serializable] -#endif + /// <summary>This exception is thrown if a buffer that is meant to have output copied into it turns out to be too + /// short, or if we've been given insufficient input.</summary> + /// <remarks> + /// In general this exception will get thrown rather than an <see cref="IndexOutOfRangeException"/>. + /// </remarks> + [Serializable] public class DataLengthException : CryptoException { - /** - * base constructor. - */ - public DataLengthException() - { - } + public DataLengthException() + : base() + { + } - /** - * create a DataLengthException with the given message. - * - * @param message the message to be carried with the exception. - */ - public DataLengthException( - string message) + public DataLengthException(string message) : base(message) - { + { + } + + public DataLengthException(string message, Exception innerException) + : base(message, innerException) + { } - public DataLengthException( - string message, - Exception exception) - : base(message, exception) - { - } + protected DataLengthException(SerializationInfo info, StreamingContext context) + : base(info, context) + { + } } }