InvalidOperationException Class
This exception should be raised by the driver to reject a command from the client. It is intended to be used for "logical" errors e.g. trying to use a command when the current configuration of the device does not allow it rather than for device errors such as a communications error.

Its the error to use when the client attempts something, which at another time would be sensible, but which is not sensible right now. If you expect the condition causing the issue to be short lived, you may choose to stall the request until the condition is cleared rather than throwing this exception. Clearly, that is a judgement that you can only make given a specific scenario.

Namespace: ASCOM
Assembly: ASCOM.Exceptions (in ASCOM.Exceptions.dll) Version: (


public class InvalidOperationException : DriverException
Visual Basic
<SerializableAttribute> _
Public Class InvalidOperationException _
	Inherits DriverException
Visual C++
public ref class InvalidOperationException : public DriverException

Inheritance Hierarchy


See Also