summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Core/Messaging/InternalErrorException.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOpenAuth.Core/Messaging/InternalErrorException.cs')
-rw-r--r--src/DotNetOpenAuth.Core/Messaging/InternalErrorException.cs56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth.Core/Messaging/InternalErrorException.cs b/src/DotNetOpenAuth.Core/Messaging/InternalErrorException.cs
new file mode 100644
index 0000000..32b44f2
--- /dev/null
+++ b/src/DotNetOpenAuth.Core/Messaging/InternalErrorException.cs
@@ -0,0 +1,56 @@
+//-----------------------------------------------------------------------
+// <copyright file="InternalErrorException.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
+
+namespace DotNetOpenAuth.Messaging {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+
+ /// <summary>
+ /// An internal exception to throw if an internal error within the library requires
+ /// an abort of the operation.
+ /// </summary>
+ /// <remarks>
+ /// This exception is internal to prevent clients of the library from catching what is
+ /// really an unexpected, potentially unrecoverable exception.
+ /// </remarks>
+ [SuppressMessage("Microsoft.Design", "CA1064:ExceptionsShouldBePublic", Justification = "We want this to be internal so clients cannot catch it.")]
+ [Serializable]
+ internal class InternalErrorException : Exception {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="InternalErrorException"/> class.
+ /// </summary>
+ public InternalErrorException() { }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="InternalErrorException"/> class.
+ /// </summary>
+ /// <param name="message">The message.</param>
+ public InternalErrorException(string message) : base(message) { }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="InternalErrorException"/> class.
+ /// </summary>
+ /// <param name="message">The message.</param>
+ /// <param name="inner">The inner exception.</param>
+ public InternalErrorException(string message, Exception inner) : base(message, inner) { }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="InternalErrorException"/> class.
+ /// </summary>
+ /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
+ /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param>
+ /// <exception cref="T:System.ArgumentNullException">
+ /// The <paramref name="info"/> parameter is null.
+ /// </exception>
+ /// <exception cref="T:System.Runtime.Serialization.SerializationException">
+ /// The class name is null or <see cref="P:System.Exception.HResult"/> is zero (0).
+ /// </exception>
+ protected InternalErrorException(
+ System.Runtime.Serialization.SerializationInfo info,
+ System.Runtime.Serialization.StreamingContext context)
+ : base(info, context) { }
+ }
+}