mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-01 02:18:44 +00:00
document a bunch of the Exceptions namespace
This commit is contained in:
@@ -8,7 +8,7 @@ using Octokit.Internal;
|
||||
namespace Octokit
|
||||
{
|
||||
/// <summary>
|
||||
/// Exception thrown when we receive an HttpStatusCode.Unauthorized (HTTP 401) response.
|
||||
/// Represents a HTTP 401 - Unauthorized response returned from the API.
|
||||
/// </summary>
|
||||
#if !NETFX_CORE
|
||||
[Serializable]
|
||||
@@ -17,15 +17,27 @@ namespace Octokit
|
||||
Justification = "These exceptions are specific to the GitHub API and not general purpose exceptions")]
|
||||
public class AuthorizationException : ApiException
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructs an instance of AuthorizationException
|
||||
/// </summary>
|
||||
public AuthorizationException() : base(new ApiResponse<object> { StatusCode = HttpStatusCode.Unauthorized })
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructs an instance of AuthorizationException
|
||||
/// </summary>
|
||||
/// <param name="response">The HTTP payload from the server</param>
|
||||
public AuthorizationException(IResponse response)
|
||||
: this(response, null)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructs an instance of AuthorizationException
|
||||
/// </summary>
|
||||
/// <param name="response">The HTTP payload from the server</param>
|
||||
/// <param name="innerException">The inner exception</param>
|
||||
public AuthorizationException(IResponse response, Exception innerException)
|
||||
: base(response, innerException)
|
||||
{
|
||||
@@ -34,6 +46,17 @@ namespace Octokit
|
||||
}
|
||||
|
||||
#if !NETFX_CORE
|
||||
/// <summary>
|
||||
/// Constructs an instance of AuthorizationException.
|
||||
/// </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 AuthorizationException(SerializationInfo info, StreamingContext context)
|
||||
: base(info, context)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user