asp.net.ph

HttpException Constructor ( String, Int32 )

System.Web Namespace   HttpException Class


Constructs an Exception using a supplied error message and an exception code.

[ VB ]
Public Sub New ( _
   ByVal message As String, _
   ByVal hr As Integer _
)

[ C# ]
public HttpException (
   string message,
   int hr
);

[ C++ ]
public: HttpException (
   String* message,
   int hr
);

[ JScript ]
public function HttpException (
   message : String,
   hr : int
);

Parameters

message
The error message displayed to the client when the exception is thrown.
hr
The exception code that defines the error.

Example

The following example throws an exception if a user-entered value is 0.

[ VB ] 
If Num = 0 Then
   Throw New HttpException ( "No value entered", 100 ) 
end if


[ C# ] 
if ( Num == 0 ) {
   throw new HttpException ( "No value entered", 100 );
}
See Also

HttpException Members   HttpException Constructor Overload List Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph