PSInvalidOperationException Constructor

Creates a new PSInvalidOperationException object. The variants of this constructor can create an empty object, an object that contains an exception message, and more.

Although cmdlets may need to catch this exception, instances of this exception class are usually generated by the Windows PowerShell runtime. It is unusual for code outside the Windows PowerShell runtime to create an instance of this class.

NameDescription
PSInvalidOperationException ()Creates a new PSInvalidOperationException object that is empty.
PSInvalidOperationException (SerializationInfo, StreamingContext)Creates a new PSInvalidOperationException object that contains information read from the provided serialization information.
PSInvalidOperationException (String)Creates a new PSInvalidOperationException object that contains an exception message.
PSInvalidOperationException (String, Exception)Creates a new PSInvalidOperationException object that contains an exception message and the inner-exception that caused this exception to be thrown.


Show:
© 2015 Microsoft