Delen via


ParseException Constructors

Definition

Overloads

ParseException()

Initializes a new instance of the class ParseException.

ParseException(ParseError[])

Initializes a new instance of the ParseException class with a collection of error messages.

ParseException(String)

Initializes a new instance of the ParseException class and defines the error message.

ParseException(SerializationInfo, StreamingContext)
Obsolete.

Initializes a new instance of the ParseException class and defines the serialization information, and streaming context.

ParseException(String, Exception)

Initializes a new instance of the ParseException class and defines the error message and inner exception.

ParseException()

Initializes a new instance of the class ParseException.

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

Applies to

ParseException(ParseError[])

Initializes a new instance of the ParseException class with a collection of error messages.

public:
 ParseException(cli::array <System::Management::Automation::Language::ParseError ^> ^ errors);
public ParseException (System.Management.Automation.Language.ParseError[] errors);
new System.Management.Automation.ParseException : System.Management.Automation.Language.ParseError[] -> System.Management.Automation.ParseException
Public Sub New (errors As ParseError())

Parameters

errors
ParseError[]

The collection of error messages.

Applies to

ParseException(String)

Initializes a new instance of the ParseException class and defines the error message.

public:
 ParseException(System::String ^ message);
public:
 ParseException(Platform::String ^ message);
 ParseException(std::wstring const & message);
public ParseException (string message);
new System.Management.Automation.ParseException : string -> System.Management.Automation.ParseException
Public Sub New (message As String)

Parameters

message
String

The error message to use when initializing this object.

Applies to

ParseException(SerializationInfo, StreamingContext)

Caution

Legacy serialization support is deprecated since .NET 8

Initializes a new instance of the ParseException class and defines the serialization information, and streaming context.

protected:
 ParseException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected ParseException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[System.Obsolete("Legacy serialization support is deprecated since .NET 8", DiagnosticId="SYSLIB0051")]
protected ParseException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Management.Automation.ParseException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Management.Automation.ParseException
[<System.Obsolete("Legacy serialization support is deprecated since .NET 8", DiagnosticId="SYSLIB0051")>]
new System.Management.Automation.ParseException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Management.Automation.ParseException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parameters

info
SerializationInfo

The serialization information to use when initializing this object.

context
StreamingContext

The streaming context to use when initializing this object.

Attributes

Applies to

ParseException(String, Exception)

Initializes a new instance of the ParseException class and defines the error message and inner exception.

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

Parameters

message
String

The error message to use when initializing this object.

innerException
Exception

The inner exception to use when initializing this object.

Applies to