Class ServiceException
A Service Exception.
Inheritance
System.Object
System.Exception
ServiceException
Inherited Members
System.Exception.GetBaseException()
System.Exception.Data
System.Exception.HelpLink
System.Exception.HResult
System.Exception.InnerException
System.Exception.Message
System.Exception.Source
System.Exception.StackTrace
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Microsoft.Graph.CoreSDK.Exceptions
Assembly: Microsoft.Graph.CoreSDK.dll
Syntax
public class ServiceException : Exception
Constructors
View SourceServiceException(Error, Exception)
Initializes a new instance of the ServiceException class.
Declaration
public ServiceException(Error error = null, Exception innerException = null)
Parameters
Type | Name | Description |
---|---|---|
Error | error | The error. |
System.Exception | innerException | The inner exception. |
Properties
View SourceError
Gets the error.
Declaration
public Error Error { get; }
Property Value
Type | Description |
---|---|
Error | The error. |
ResponseHeaders
Gets or sets the response headers.
Declaration
public HttpResponseHeaders ResponseHeaders { get; set; }
Property Value
Type | Description |
---|---|
System.Net.Http.Headers.HttpResponseHeaders | The response headers. |
StatusCode
Gets or sets the status code.
Declaration
public HttpStatusCode StatusCode { get; set; }
Property Value
Type | Description |
---|---|
System.Net.HttpStatusCode | The status code. |
Methods
View SourceIsMatch(String)
Determines whether the specified error code is a match.
Declaration
public bool IsMatch(string errorCode)
Parameters
Type | Name | Description |
---|---|---|
System.String | errorCode | The error code. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Exceptions
Type | Condition |
---|---|
System.ArgumentException | errorCode cannot be null or empty - errorCode |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
System.Exception.ToString()
See Also
System.Exception