HttpParseException Konstruktorer
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Initierar en ny instans av HttpParseException klassen.
Överlagringar
| Name | Description |
|---|---|
| HttpParseException() |
Initierar en ny instans av HttpParseException klassen. |
| HttpParseException(String) |
Initierar en ny instans av HttpParseException klassen med ett angivet felmeddelande. |
| HttpParseException(String, Exception) |
Initierar en ny instans av HttpParseException klassen med ett angivet felmeddelande och en referens till den inre. |
| HttpParseException(String, Exception, String, String, Int32) |
Initierar en ny instans av HttpParseException klassen med specifik information om källkoden som kompileras och det radnummer som undantaget inträffade på. |
HttpParseException()
Initierar en ny instans av HttpParseException klassen.
public:
HttpParseException();
public HttpParseException();
Public Sub New ()
Gäller för
HttpParseException(String)
Initierar en ny instans av HttpParseException klassen med ett angivet felmeddelande.
public:
HttpParseException(System::String ^ message);
public HttpParseException(string message);
new System.Web.HttpParseException : string -> System.Web.HttpParseException
Public Sub New (message As String)
Parametrar
- message
- String
Undantagsmeddelandet som ska anges när felet inträffar.
Exempel
I följande exempel visas hur konstruktorn används HttpException . Ett komplett exempel på fungerande kod finns i översiktsavsnittet HttpParseException .
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""")
Gäller för
HttpParseException(String, Exception)
Initierar en ny instans av HttpParseException klassen med ett angivet felmeddelande och en referens till den inre.
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)
Parametrar
- message
- String
Undantagsmeddelandet som ska anges när felet inträffar.
- innerException
- Exception
Undantaget som är orsaken till det aktuella undantaget. Om parametern innerException inte nullär genereras det aktuella undantaget i ett catch block som hanterar det inre undantaget.
Gäller för
HttpParseException(String, Exception, String, String, Int32)
Initierar en ny instans av HttpParseException klassen med specifik information om källkoden som kompileras och det radnummer som undantaget inträffade på.
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)
Parametrar
- message
- String
Undantagsmeddelandet som ska anges när felet inträffar.
- innerException
- Exception
Undantaget som är orsaken till det aktuella undantaget. Om innerException inte nullgenereras det aktuella undantaget i ett catch block som hanterar det inre undantaget.
- virtualPath
- String
Den virtuella sökvägen för undantaget.
- sourceCode
- String
Källkoden som kompileras när undantaget inträffar.
- line
- Int32
Det radnummer som undantaget inträffade på.