System.Web Namespace HttpException Class
Constructs an Exception using a supplied error message.
[ VB ]
Public Sub New ( _
ByVal message As String _
)
[ C# ]
public HttpException (
string message
);
[ C++ ]
public: HttpException (
String* message
);
[ JScript ]
public function HttpException (
message : String
);
- message
- The message displayed to the client when the exception is thrown.
The following example throws an exception if a user-entered value is 0.
[ VB ]
If Num = 0 Then
Throw New HttpException ( "No value entered" )
end if
[ C# ]
if ( Num == 0 ) {
throw new HttpException ( "No value entered" );
}
HttpException Members HttpException Constructor Overload List