Udostępnij za pośrednictwem


HaltCommandException Class

Definition

A cmdlet/provider should throw HaltCommandException when it wants to terminate the running command without this being considered an error.

public ref class HaltCommandException : SystemException
[System.Serializable]
public class HaltCommandException : SystemException
public class HaltCommandException : SystemException
[<System.Serializable>]
type HaltCommandException = class
    inherit SystemException
type HaltCommandException = class
    inherit SystemException
Public Class HaltCommandException
Inherits SystemException
Inheritance
HaltCommandException
Attributes

Remarks

For example, "more" will throw HaltCommandException if the user hits "q".

Only throw HaltCommandException from your implementation of ProcessRecord etc.

Note that HaltCommandException does not define IContainsErrorRecord. This is because it is not reported to the user.

Constructors

HaltCommandException()

Instantiates a new instance of the HaltCommandException class.

HaltCommandException(SerializationInfo, StreamingContext)
Obsolete.

Initializes a new instance of the HaltCommandException class using data serialized via ISerializable

HaltCommandException(String, Exception)

Instantiates a new instance of the HaltCommandException class.

HaltCommandException(String)

Instantiates a new instance of the HaltCommandException class.

Applies to