mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-06 20:13:40 +00:00
sketching out the exception necessary when raising specific merge exceptions
This commit is contained in:
committed by
Victor Castillo Escoto
parent
e59c3cbc2d
commit
db57a92a7e
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents an error that occurs when the specified SHA
|
||||
/// doesn't match the current pull request's HEAD
|
||||
/// </summary>
|
||||
#if !NETFX_CORE
|
||||
[Serializable]
|
||||
#endif
|
||||
public class PullRequestMismatchException : Exception
|
||||
{
|
||||
public PullRequestMismatchException()
|
||||
: base("The merge operation specified a SHA which didn't match " +
|
||||
"the SHA of the pull request's HEAD")
|
||||
{
|
||||
}
|
||||
|
||||
public PullRequestMismatchException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public PullRequestMismatchException(string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
{
|
||||
}
|
||||
|
||||
#if !NETFX_CORE
|
||||
/// <summary>
|
||||
/// Constructs an instance of PullRequestNotMergeableException.
|
||||
/// </summary>
|
||||
/// <param name="info">
|
||||
/// The <see cref="SerializationInfo"/> that holds the
|
||||
/// serialized object data about the exception being thrown.
|
||||
/// </param>
|
||||
/// <param name="context">
|
||||
/// The <see cref="StreamingContext"/> that contains
|
||||
/// contextual information about the source or destination.
|
||||
/// </param>
|
||||
protected PullRequestMismatchException(SerializationInfo info, StreamingContext context)
|
||||
: base(info, context)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user