using System; using System.Runtime.Serialization; namespace RedditSharp { /// /// Represents an error that occurred during accessing or manipulating data on Reddit. /// [Serializable] public class RedditException : Exception { /// /// Initializes a new instance of the RedditException class. /// public RedditException() { } /// /// Initializes a new instance of the RedditException class with a specified error message. /// /// The message that describes the error. public RedditException(string message) : base(message) { } /// /// Initializes a new instance of the RedditException class with a specified error message and /// a referenced inner exception that is the cause of this exception. /// /// The message that describes the error. /// The exception that is the cause of the current exception, or a null /// reference (Nothing in Visual Basic) if no inner exception is specified. public RedditException(string message, Exception inner) : base(message, inner) { } /// /// Initializes a new instance of the RedditException class with serialized data. /// /// The System.Runtime.Serialization.SerializationInfo that holds the /// serialized object data about the exception being thrown. /// The System.Runtime.Serialization.StreamingContext that contains /// contextual information about the source or destination. /// The info parameter is null. /// The class name /// is null or System.Exception.HResult is zero (0). protected RedditException(SerializationInfo info, StreamingContext context) : base(info, context) { } } }