Show / Hide Table of Contents

Class HttpException

Describes an exception that occurred during the processing of HTTP requests.

Inheritance
System.Object
System.Exception
System.SystemException
System.Runtime.InteropServices.ExternalException
HttpException
Implements
System.Runtime.Serialization.ISerializable
System.Runtime.InteropServices._Exception
Inherited Members
System.Runtime.InteropServices.ExternalException.ToString()
System.Runtime.InteropServices.ExternalException.ErrorCode
System.Exception.GetBaseException()
System.Exception.GetType()
System.Exception.Message
System.Exception.Data
System.Exception.InnerException
System.Exception.TargetSite
System.Exception.StackTrace
System.Exception.HelpLink
System.Exception.Source
System.Exception.HResult
System.Exception.SerializeObjectState
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.MemberwiseClone()
Namespace: Terrasoft.Web.Http.Abstractions
Assembly: Terrasoft.Web.Http.Abstractions.dll
Syntax
public class HttpException : ExternalException, ISerializable, _Exception

Constructors

HttpException()

Initializes a new instance of the HttpException class.

Declaration
public HttpException()

HttpException(Int32, String)

Initializes a new instance of the HttpException class.

Declaration
public HttpException(int httpCode, string message)
Parameters
Type Name Description
System.Int32 httpCode

The HTTP code.

System.String message

The error message that explains the reason for the exception.

HttpException(Int32, String, Exception)

Initializes a new instance of the HttpException class.

Declaration
public HttpException(int httpCode, string message, Exception innerException)
Parameters
Type Name Description
System.Int32 httpCode

The HTTP code.

System.String message

The message.

System.Exception innerException

The inner exception.

HttpException(Int32, String, Int32)

Initializes a new instance of the HttpException class.

Declaration
public HttpException(int httpCode, string message, int hr)
Parameters
Type Name Description
System.Int32 httpCode

The HTTP code.

System.String message

The error message that explains the reason for the exception.

System.Int32 hr

The System.Exception.HResult value.

HttpException(HttpStatusCode, String)

Initializes a new instance of the HttpException class.

Declaration
public HttpException(HttpStatusCode httpCode, string message)
Parameters
Type Name Description
System.Net.HttpStatusCode httpCode

The HTTP code.

System.String message

The error message that explains the reason for the exception.

HttpException(HttpStatusCode, String, Exception)

Initializes a new instance of the HttpException class.

Declaration
public HttpException(HttpStatusCode httpCode, string message, Exception innerException)
Parameters
Type Name Description
System.Net.HttpStatusCode httpCode

The HTTP code.

System.String message

The error message that explains the reason for the exception.

System.Exception innerException

The inner exception.

HttpException(SerializationInfo, StreamingContext)

Initializes a new instance of the HttpException class.

Declaration
protected HttpException(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info

The object that holds the serialized object data.

System.Runtime.Serialization.StreamingContext context

The contextual information about the source or destination.

HttpException(String)

Initializes a new instance of the HttpException class.

Declaration
public HttpException(string message)
Parameters
Type Name Description
System.String message

The error message that specifies the reason for the exception.

HttpException(String, Exception)

Initializes a new instance of the HttpException class.

Declaration
public HttpException(string message, Exception innerException)
Parameters
Type Name Description
System.String message

The error message that explains the reason for the exception.

System.Exception innerException

The exception that is the cause of the current exception.

Methods

GetHttpCode()

Gets the HTTP response status code to return to the client.

Declaration
public int GetHttpCode()
Returns
Type Description
System.Int32

GetHttpStatusCode()

Gets the HTTP response status code to return to the client.

Declaration
public HttpStatusCode GetHttpStatusCode()
Returns
Type Description
System.Net.HttpStatusCode

GetObjectData(SerializationInfo, StreamingContext)

Declaration
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info
System.Runtime.Serialization.StreamingContext context
Overrides
System.Exception.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)

Implements

System.Runtime.Serialization.ISerializable
System.Runtime.InteropServices._Exception

Extension Methods

ReflectionUtilities.GetPropertyValue(Object, String)
ReflectionUtilities.GetPropertyDefValue(Object, String, Object)
ReflectionUtilities.TryGetPropertyValue(Object, String, out Object)
ReflectionUtilities.HasProperty(Object, String)
ReflectionUtilities.GetPropertyValue(Object, String, BindingFlags)
ReflectionUtilities.GetPropertyValueByPath(Object, String)
ReflectionUtilities.SetPropertyValue(Object, String, Object)
ReflectionUtilities.TrySetPropertyValue(Object, String, Object)
ValidateUtilities.CheckArgumentNull(Object, String)
ValidateUtilities.CheckDependencyNull(Object, String)
ValidateUtilities.EnsureDependencyNotNull<T>(T, String)
ExceptionExtension.ToResponse<T>(Exception)
ExceptionExtension.GetExceptionContent(Exception)
MetaDataTestUtils.MetaPropertiesShouldNotHaveDefValue<TInstance>(TInstance)
MetaDataTestUtils.MetaPropertiesShouldNotHaveDefValue<TInstance>(TInstance, Boolean)
NSubstituteExtension.Protected(Object, String, Object[])
NSubstituteExtension.Protected(Object, String, Boolean, Object[])
NSubstituteExtension.ProtectedGeneric<T>(Object, String, Object[])
NSubstituteExtension.ProtectedGeneric<T>(Object, String, Boolean, Object[])
NSubstituteExtension.ProtectedProperty(Object, String)
NSubstituteExtension.MatchInstance<T>(T)
SubstituteUtilities.GetIsSubstituteObject(Object)
SubstituteUtilities.Instead<TInstance, TValue>(TInstance, Func<TInstance, TValue>)

See Also

System.Runtime.InteropServices.ExternalException
Back to top Generated by DocFX