using System;
using System.Runtime.Serialization;
using LibGit2Sharp.Core;
namespace LibGit2Sharp
{
///
/// The exception that is thrown when a checkout cannot be performed
/// because of a conflicting change staged in the index, or unstaged
/// in the working directory.
///
[Serializable]
public class CheckoutConflictException : LibGit2SharpException
{
///
/// Initializes a new instance of the class.
///
public CheckoutConflictException()
{
}
///
/// Initializes a new instance of the class with a specified error message.
///
/// A message that describes the error.
public CheckoutConflictException(string message)
: base(message)
{
}
///
/// 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 CheckoutConflictException(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 CheckoutConflictException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
internal CheckoutConflictException(string message, GitErrorCode code, GitErrorCategory category)
: base(message, code, category)
{
}
}
}