mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-01 18:35:35 +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,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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user