[SerializableAttribute]
[ComVisibleAttribute(true)]
[GuidAttribute("64DC4F51-E5EB-4F28-A8B9-782F78A778FA")]
public class InvalidOperationException : DriverException<SerializableAttribute>
<ComVisibleAttribute(true)>
<GuidAttribute("64DC4F51-E5EB-4F28-A8B9-782F78A778FA")>
Public Class InvalidOperationException
Inherits DriverExceptionThe exception 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.
If you need to throw this error as a COM exception use the error number: 0x8004040B.
| InvalidOperationException | Default public constructor for NotConnectedException takes no parameters. |
| InvalidOperationException(Exception) | Initializes a new instance of the InvalidOperationException class from another exception. |
| InvalidOperationException(String) | Initializes a new instance of the InvalidOperationException class with a non-default error message. |
| InvalidOperationException(String, Exception) | Initializes a new instance of the InvalidOperationException class based on another exception. |
| Number |
The COM error code for this exception (hex 80040400 - 800404FF)
(Inherited from DriverException) |
| ErrorCode |
Extension method to get the Alpaca Error Code for an Exception. Returns UnspecifiedError if it cannot find a better code
(Defined by ExceptionHelpers) |