using System; using System.Runtime.Serialization; using LibGit2Sharp.Core; namespace LibGit2Sharp { /// /// The exception that is thrown when a reference, a remote, a submodule... with the same name already exists in the repository /// [Serializable] public class NameConflictException : LibGit2SharpException { /// /// Initializes a new instance of the class. /// public NameConflictException() { } /// /// Initializes a new instance of the class with a specified error message. /// /// A message that describes the error. public NameConflictException(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 NameConflictException(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 NameConflictException(SerializationInfo info, StreamingContext context) : base(info, context) { } internal NameConflictException(string message, GitErrorCode code, GitErrorCategory category) : base(message, code, category) { } } }