HaltCommandException HaltCommandException HaltCommandException Class

Definition

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

public class HaltCommandException : SystemException
type HaltCommandException = class
    inherit SystemException
Public Class HaltCommandException
Inherits SystemException
Inheritance
HaltCommandExceptionHaltCommandExceptionHaltCommandException

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() HaltCommandException() HaltCommandException()

Instantiates a new instance of the HaltCommandException class

HaltCommandException(String) HaltCommandException(String) HaltCommandException(String)

Instantiates a new instance of the HaltCommandException class

HaltCommandException(SerializationInfo, StreamingContext) HaltCommandException(SerializationInfo, StreamingContext) HaltCommandException(SerializationInfo, StreamingContext)

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

HaltCommandException(String, Exception) HaltCommandException(String, Exception) HaltCommandException(String, Exception)

Instantiates a new instance of the HaltCommandException class

Applies to