sketching out the exception necessary when raising specific merge exceptions

This commit is contained in:
Brendan Forster
2015-06-16 22:29:02 +09:30
committed by Victor Castillo Escoto
parent e59c3cbc2d
commit db57a92a7e
9 changed files with 132 additions and 3 deletions
@@ -0,0 +1,48 @@
using System;
using System.Runtime.Serialization;
namespace Octokit
{
/// <summary>
/// Represents an error that occurs when the pull request is in an
/// unmergeable state
/// </summary>
#if !NETFX_CORE
[Serializable]
#endif
public class PullRequestNotMergeableException : Exception
{
public PullRequestNotMergeableException()
: base("The pull request is not in a mergeable state")
{
}
public PullRequestNotMergeableException(string message)
: base(message)
{
}
public PullRequestNotMergeableException(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 PullRequestNotMergeableException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
#endif
}
}