Redigeeri

Jagamisviis:


HttpParseException Constructors

Definition

Initializes a new instance of the HttpParseException class.

Overloads

HttpParseException()

Initializes a new instance of the HttpParseException class.

HttpParseException(String)

Initializes a new instance of the HttpParseException class with a specified error message.

HttpParseException(String, Exception)

Initializes a new instance of the HttpParseException class with a specified error message and a reference to the inner.

HttpParseException(String, Exception, String, String, Int32)

Initializes a new instance of the HttpParseException class with specific information about the source code being compiled and the line number on which the exception occurred.

HttpParseException()

Initializes a new instance of the HttpParseException class.

public:
 HttpParseException();
public HttpParseException ();
Public Sub New ()

Applies to

HttpParseException(String)

Initializes a new instance of the HttpParseException class with a specified error message.

public:
 HttpParseException(System::String ^ message);
public HttpParseException (string message);
new System.Web.HttpParseException : string -> System.Web.HttpParseException
Public Sub New (message As String)

Parameters

message
String

The exception message to specify when the error occurs.

Examples

The following example demonstrates the use of the HttpException constructor. For a complete, working code example, see the HttpParseException overview topic.

throw new HttpParseException("This custom HtmlSelect control" +                                                  "requires child elements of the form \"MyCustomOption\"");
Throw New HttpParseException("This custom HtmlSelect control" & _ 
         "requires child elements of the form ""MyCustomOption""")

Applies to

HttpParseException(String, Exception)

Initializes a new instance of the HttpParseException class with a specified error message and a reference to the inner.

public:
 HttpParseException(System::String ^ message, Exception ^ innerException);
public HttpParseException (string message, Exception innerException);
new System.Web.HttpParseException : string * Exception -> System.Web.HttpParseException
Public Sub New (message As String, innerException As Exception)

Parameters

message
String

The exception message to specify when the error occurs.

innerException
Exception

The exception that is the cause of the current exception. If the innerException parameter is not null, the current exception is raised in a catch block that handles the inner exception.

Applies to

HttpParseException(String, Exception, String, String, Int32)

Initializes a new instance of the HttpParseException class with specific information about the source code being compiled and the line number on which the exception occurred.

public:
 HttpParseException(System::String ^ message, Exception ^ innerException, System::String ^ virtualPath, System::String ^ sourceCode, int line);
public HttpParseException (string message, Exception innerException, string virtualPath, string sourceCode, int line);
new System.Web.HttpParseException : string * Exception * string * string * int -> System.Web.HttpParseException
Public Sub New (message As String, innerException As Exception, virtualPath As String, sourceCode As String, line As Integer)

Parameters

message
String

The exception message to specify when the error occurs.

innerException
Exception

The exception that is the cause of the current exception. If innerException is not null, the current exception is raised in a catch block that handles the inner exception.

virtualPath
String

The virtual path for the exception.

sourceCode
String

The source code being compiled when the exception occurs.

line
Int32

The line number on which the exception occurred.

Applies to