Skip to main content

Definition

Assembly: Microsoft.Restier.Core.dll Namespace: Microsoft.Restier.Core Inheritance: System.Exception

Syntax

Microsoft.Restier.Core.StatusCodeException

Summary

Use this exception when you want to return a specific status code

Constructors

.ctor

Initializes a new instance of the StatusCodeException class.

Syntax

public StatusCodeException()

.ctor

Initializes a new instance of the StatusCodeException class.

Syntax

public StatusCodeException(string message)

Parameters

NameTypeDescription
messagestringPlain text error message for this exception.

.ctor

Initializes a new instance of the StatusCodeException class.

Syntax

public StatusCodeException(string message, System.Exception innerException)

Parameters

NameTypeDescription
messagestringPlain text error message for this exception.
innerExceptionSystem.ExceptionException that caused this exception to be thrown.

.ctor

Initializes a new instance of the StatusCodeException class.

Syntax

public StatusCodeException(System.Net.HttpStatusCode statusCode, string message)

Parameters

NameTypeDescription
statusCodeSystem.Net.HttpStatusCode-
messagestringPlain text error message for this exception.

.ctor

Initializes a new instance of the StatusCodeException class.

Syntax

public StatusCodeException(System.Net.HttpStatusCode statusCode, string message, System.Exception innerException)

Parameters

NameTypeDescription
statusCodeSystem.Net.HttpStatusCode-
messagestringPlain text error message for this exception.
innerExceptionSystem.ExceptionException that caused this exception to be thrown.

Properties

StatusCode

Syntax

public System.Net.HttpStatusCode StatusCode { get; private set; }

Property Value

Type: System.Net.HttpStatusCode