Share via


ServiceException Constructors

Definition

Overloads

ServiceException(Error, Exception)

Creates a new service exception.

ServiceException(Error, HttpResponseHeaders, HttpStatusCode, Exception)

Creates a new service exception.

ServiceException(Error, HttpResponseHeaders, HttpStatusCode, String, Exception)

Creates a new service exception.

ServiceException(Error, Exception)

Creates a new service exception.

public ServiceException (Microsoft.Graph.Error error, Exception innerException = default);
new Microsoft.Graph.ServiceException : Microsoft.Graph.Error * Exception -> Microsoft.Graph.ServiceException
Public Sub New (error As Error, Optional innerException As Exception = Nothing)

Parameters

error
Error

The error that triggered the exception.

innerException
Exception

The possible innerException.

Applies to

ServiceException(Error, HttpResponseHeaders, HttpStatusCode, Exception)

Creates a new service exception.

public ServiceException (Microsoft.Graph.Error error, System.Net.Http.Headers.HttpResponseHeaders responseHeaders, System.Net.HttpStatusCode statusCode, Exception innerException = default);
new Microsoft.Graph.ServiceException : Microsoft.Graph.Error * System.Net.Http.Headers.HttpResponseHeaders * System.Net.HttpStatusCode * Exception -> Microsoft.Graph.ServiceException
Public Sub New (error As Error, responseHeaders As HttpResponseHeaders, statusCode As HttpStatusCode, Optional innerException As Exception = Nothing)

Parameters

error
Error

The error that triggered the exception.

responseHeaders
HttpResponseHeaders

The HTTP response headers from the response.

statusCode
HttpStatusCode

The HTTP status code from the response.

innerException
Exception

The possible innerException.

Applies to

ServiceException(Error, HttpResponseHeaders, HttpStatusCode, String, Exception)

Creates a new service exception.

public ServiceException (Microsoft.Graph.Error error, System.Net.Http.Headers.HttpResponseHeaders responseHeaders, System.Net.HttpStatusCode statusCode, string rawResponseBody, Exception innerException = default);
new Microsoft.Graph.ServiceException : Microsoft.Graph.Error * System.Net.Http.Headers.HttpResponseHeaders * System.Net.HttpStatusCode * string * Exception -> Microsoft.Graph.ServiceException
Public Sub New (error As Error, responseHeaders As HttpResponseHeaders, statusCode As HttpStatusCode, rawResponseBody As String, Optional innerException As Exception = Nothing)

Parameters

error
Error

The error that triggered the exception.

responseHeaders
HttpResponseHeaders

The HTTP response headers from the response.

statusCode
HttpStatusCode

The HTTP status code from the response.

rawResponseBody
String

The raw JSON response body.

innerException
Exception

The possible innerException.

Applies to