15.2 Constructor Reference

The HttpException provides several overloaded constructors for communicating custom HTTP error information:

Dim MyHttpEx As New HttpException( )

Creates an empty instance of HttpException.

Throw New HttpException(string)

Throws an HttpException whose Message property is set to the value of the string passed into the constructor.

Throw New HttpException(integer, string)

Throws an HttpException whose GetHttpCode method will return the integer value passed into the constructor, and whose Message property is set to the value of the string passed into the constructor.

Throw New HttpException(string, Exception)

Throws an HttpException whose Message property is set to the value of the string passed into the constructor, and whose InnerException property is set to the Exception object passed into the constructor.

Throw New HttpException(string, integer)

Throws an HttpException whose Message property is set to the value of the string passed into the constructor, and whose ErrorCode property is set to the value of the integer passed into the constructor.

Throw New HttpException(integer, string, Exception)

Throws an HttpException whose GetHttpCode method returns the integer value passed into the constructor, whose Message property is set to the value of the string passed into the constructor, and whose InnerException property is set to the Exception object passed into the constructor.

Throw New HttpException(integer, string, integer)

Throws an HttpException whose GetHttpCode method returns the first integer value passed into the constructor, whose Message property is set to the value of the string passed into the constructor, and whose ErrorCode property is set to the value of the second integer passed into the constructor.



ASP. NET in a Nutshell
ASP.NET in a Nutshell, Second Edition
ISBN: 0596005202
EAN: 2147483647
Year: 2003
Pages: 873

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net