using System;
using System.Runtime.Serialization;
using LibGit2Sharp.Core;
namespace LibGit2Sharp
{
///
/// The exception that is thrown when a provided specification is bad. This
/// can happen if the provided specification is syntactically incorrect, or
/// if the spec refers to an object of an incorrect type (e.g. asking to
/// create a branch from a blob, or peeling a blob to a commit).
///
[Serializable]
public class InvalidSpecificationException : LibGit2SharpException
{
///
/// Initializes a new instance of the class.
///
public InvalidSpecificationException()
{ }
///
/// Initializes a new instance of the class with a specified error message.
///
/// A message that describes the error.
public InvalidSpecificationException(string message)
: base(message)
{ }
///
/// Initializes a new instance of the class with a specified error message.
///
/// A composite format string for use in .
/// An object array that contains zero or more objects to format.
public InvalidSpecificationException(string format, params object[] args)
: base(format, args)
{ }
///
/// Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception.
///
/// The error message that explains the reason for the exception.
/// The exception that is the cause of the current exception. If the parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception.
public InvalidSpecificationException(string message, Exception innerException)
: base(message, innerException)
{ }
///
/// Initializes a new instance of the class with a serialized data.
///
/// The that holds the serialized object data about the exception being thrown.
/// The that contains contextual information about the source or destination.
protected InvalidSpecificationException(SerializationInfo info, StreamingContext context)
: base(info, context)
{ }
internal InvalidSpecificationException(string message, GitErrorCode code, GitErrorCategory category)
: base(message, code, category)
{ }
}
}