System.Web Namespace HttpException Class
Constructs an Exception using an HTTP error code, an error message, and the InnerException property.
[ VB ]
Public Sub New ( _
ByVal httpCode As Integer, _
ByVal message As String, _
ByVal innerException As Exception _
)
[ C# ]
public HttpException (
int httpCode,
string message,
Exception innerException
);
[ C++ ]
public: HttpException (
int httpCode,
String* message,
Exception* innerException
);
[ JScript ]
public function HttpException (
httpCode : int,
message : String,
innerException : Exception
);
- httpCode
- The HTTP error code displayed to the client.
- message
- The message displayed to the client.
- innerException
- The InnerException, if any, that threw the current exception.
When handling exceptions, it is sometimes useful to capture a series of related exceptions with the outer exceptions being thrown in response to an inner exceptions.
A reference to the inner exceptions that causes the outer exceptions is available from the InnerException property of the outer exception. This mechanism preserves the error information carried by earlier exceptions, including the original exceptions, while allowing you to create more meaningful outer exceptions. For more information, see InnerException.
HttpException Members HttpException Constructor Overload List