HttpParseException HttpParseException HttpParseException HttpParseException Constructors

Definition

Overloads

HttpParseException() HttpParseException() HttpParseException()

Initializes a new instance of the HttpParseException class.

HttpParseException(String) HttpParseException(String) HttpParseException(String) HttpParseException(String)

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

HttpParseException(String, Exception) HttpParseException(String, Exception) HttpParseException(String, Exception) 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) HttpParseException(String, Exception, String, String, Int32) HttpParseException(String, Exception, String, String, Int32) 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() HttpParseException() HttpParseException()

Initializes a new instance of the HttpParseException class.

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

HttpParseException(String) HttpParseException(String) HttpParseException(String) 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 String String 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""")

HttpParseException(String, Exception) HttpParseException(String, Exception) HttpParseException(String, Exception) 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 String String String

The exception message to specify when the error occurs.

innerException
Exception Exception Exception 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.

HttpParseException(String, Exception, String, String, Int32) HttpParseException(String, Exception, String, String, Int32) HttpParseException(String, Exception, String, String, Int32) 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 String String String

The exception message to specify when the error occurs.

innerException
Exception Exception Exception 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 String String String

The virtual path for the exception.

sourceCode
String String String String

The source code being compiled when the exception occurs.

line
Int32 Int32 Int32 Int32

The line number on which the exception occurred.

Applies to