System.Web Namespace HttpException Class
Constructs an Exception using an error message and the InnerException property.
[ VB ]
Public Sub New ( _
ByVal message As String, _
ByVal innerException As Exception _
)
[ C# ]
public HttpException (
string message,
Exception innerException
);
[ C++ ]
public: HttpException (
String* message,
Exception* innerException
);
[ JScript ]
public function HttpException (
message : String,
innerException : Exception
);
- message
- The message displayed to the client when the exception is thrown.
- 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 exception.
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