using System;
using System.Runtime.Serialization;
namespace UptimeSharp
{
///
/// custom UptimeRobot API Exceptions
///
public class UptimeSharpException : Exception
{
///
/// Gets or sets the UptimeRobot error code.
///
///
/// The pocket error code.
///
public int? ErrorCode { get; set; }
///
/// Gets or sets the UptimeRobot error.
///
///
/// The pocket error.
///
public string Error { get; set; }
///
/// Initializes a new instance of the class.
///
public UptimeSharpException()
: base() { }
///
/// Initializes a new instance of the class.
///
/// The message that describes the error.
public UptimeSharpException(string message)
: base(message) { }
///
/// Initializes a new instance of the class.
///
/// The message.
/// The arguments.
public UptimeSharpException(string message, params object[] args)
: base(string.Format(message, args)) { }
///
/// Initializes a new instance of the class.
///
/// The error message that explains the reason for the exception.
/// 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 UptimeSharpException(string message, Exception innerException)
: base(message, innerException) { }
///
/// Initializes a new instance of the class.
///
/// The message.
/// The inner exception.
/// The arguments.
public UptimeSharpException(string message, Exception innerException, params object[] args)
: base(string.Format(message, args), innerException) { }
///
/// Initializes a new instance of the class.
///
/// The that holds the serialized object data about the exception being thrown.
/// The that contains contextual information about the source or destination.
protected UptimeSharpException(SerializationInfo info, StreamingContext context)
: base(info, context) { }
}
}