ASCOM.Exceptions Exception thrown by a driver when it receives an unknown command through the Action method. If you need to throw this error as a COM exception use the error number: 0x8004040C. Create a new exception object and identify the specified driver method as the source. The name of the action that caused the exception. Create a new exception object and identify the specified driver method as the source, and include an inner exception object containing a caught exception. The name of the driver method that caused the exception The caught exception For Code Analysis, please don't use Initializes a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. The parameter is null. The class name is null or is zero (0). The method that is not implemented Exception thrown by DriverAccess to return a driver COM error to the client. This exception appears as a COMException to the client having the original exception's description and error number as well as the original exception as the inner exception. Creates a new DriverAccessCOException The error message to display The COM error code to attach to this exception Any inner exception that is to be attached to the exception, or null if there is no inner exception This exception should be raised by the driver to reject a command from the client. The 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. Default public constructor for NotConnectedException takes no parameters. Initializes a new instance of the class from another exception. The inner exception. Initializes a new instance of the class with a non-default error message. A descriptive human-readable message. Initializes a new instance of the class based on another exception. Descriptive text documenting the cause or source of the error. The inner exception the led to the throwing of this exception. Added to keep Code Analysis happy All methods defined by the relevant ASCOM standard interface must exist in each driver. However, those methods do not all have to be implemented. The minimum requirement for each defined method is to throw the ASCOM.MethodNotImplementedException. Note that no default constructor is supplied. Throwing this requires the the method name. If you need to throw this error as a COM exception use the error number: 0x80040400. Create a new exception object and identify the specified driver method as the source. The name of the driver method that caused the exception. Create a new exception object and identify the specified driver method as the source, and include an inner exception object containing a caught exception. The name of the driver method that caused the exception The caught exception For Code Analysis, please don't use Initializes a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. The parameter is null. The class name is null or is zero (0). The method that is not implemented This is the generic driver exception. Drivers are permitted to directly throw this exception as well as any derived exceptions. Note that the Message property is a member of , the base class of DriverException. The property of is simply renamed to Number. This exception should only be thrown if there is no other more appropriate exception already defined, e.g. PropertyNotImplemented, InvalidOperationException, InvalidValueException, NotConnectedException etc. These specific exceptions should be thrown where appropriate rather than using the more generic DriverException. Conform will not accept DriverExceptions where more appropriate exceptions are already defined. As good programming practice, the Message property should not be empty, so that users understand why the exception was thrown. Create a new ASCOM exception using the specified text message and error code. Descriptive text describing the cause of the exception Error code for the exception (80040400 - 80040FFF). Create a new ASCOM exception based on another exception plus additional descriptive text and error code. This member is required for a well-behaved exception class. For example, if a driver receives an exception (perhaps a COMException) from some other component yet it wants to report some meaningful error that resulted from the other error, it can package the original error in the InnerException member of the exception it generates. Descriptive text describing the cause of the exception Error code for the exception (80040400 - 80040FFF). The inner exception that led to throwing this exception Initializes a new instance of the class that will return the 'unspecified error' number: 0x800404FF. Sets the COM HResult to . Initializes a new instance of the class with a human-readable descriptive message. The human-readable description of the problem. Initializes a new instance of the class from another caught exception and a human-readable descriptinve message. The human-readable description of the problem. The caught (inner) exception. Initializes a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. The parameter is null. The class name is null or is zero (0). The COM error code for this exception (hex 80040400 - 800404FF) Error numbers for use by drivers. The range of permitted values falls within the class FACILTY_ITF as defined by the operating system and COM. These values will never clash with COM, RPC, or OS error codes. Driver developers may extend this class by making use of the partial keyword. Reserved error number (0x80040400) for property or method not implemented. See ASCOM.Exception.NotImplementedException. Reserved error code (0x80040401) for reporting an invalid value. See ASCOM.Exception.InvalidValueException. Reserved error code (0x80040402) for reporting that a value has not been set. See ASCOM.Exception.ValueNotSetException. Reserved error code (0x80040407) used to indicate that the communications channel is not connected. Reserved error code (0x80040408) used to indicate that the attempted operation is invalid because the mount is currently in a Parked state. Reserved error code (0x80040409) used to indicate that the attempted operation is invalid because the mount is currently in a Slaved state. Reserved error code (0x8004040A) related to settings. Reserved error code (0x8004040B) to indicate that the requested operation can not be undertaken at this time. Reserved error code (0x8004040C) to indicate that the requested action is not implemented in this driver. Reserved error code (0x8004040D) to indicate that the requested item is not present in the ASCOM cache. The exception is defined in the ASCOM.Cache component rather than ASCOM.Exceptions. Reserved 'catch-all' error code (0x800404FF) used when nothing else was specified. The starting value (0x80040500) for driver-specific error numbers. Drivers are free to choose their own numbers starting with DriverBase, up to and including DriverMax. The maximum value (0x80040FFF) for driver-specific error numbers. Drivers are free to choose their own numbers starting with DriverBase, up to and including DriverMax. Exception to report an invalid value supplied to a driver. The most useful way to use this exception is to inform the user which property/method/parameter received the invalid value and also the range of allowed values. If you need to throw this error as a COM exception use the error number: 0x80040401. Create a new exception object and identify the specified driver property or method as the source. The name of the driver property/accessor or method that caused the exception The invalid value that was supplied Create a new exception object and identify the specified driver property or method as the source. The name of the driver property/accessor or method that caused the exception The invalid value that was supplied The valid value range Create a new exception object and identify the specified driver property as the source, and include an inner exception object containing a caught exception. The name of the driver property/accessor or method that caused the exception The invalid value that was supplied The caught exception The valid value range Create a new exception Exception description Create a new exception Exception description The underlying exception that caused this exception to be thrown. Create a new exception object Added to keep Code Analysis happy The property/accessor or method that has an invalid value. The invalid value. The valid range for this property. The lower value of the valid range. The higher end of the valid range. This exception should be raised when an operation is attempted that requires communication with the device, but the device is disconnected. If you need to throw this error as a COM exception use the error number: 0x80040400. Default public constructor for NotConnectedException takes no parameters. Initializes a new instance of the class from another exception. The inner exception. Initializes a new instance of the class with a non-default error message. A descriptive human-readable message. Initializes a new instance of the class based on another exception. Descriptive text documenting the cause or source of the error. The inner exception the led to the throwing of this exception. Added to keep Code Analysis happy All properties and methods defined by the relevant ASCOM standard interface must exist in each driver. However, those properties and methods do not all have to be implemented. This exception is a base class for PropertyNotImplementedException and MethodNotImplementedException, which drivers should use for throwing the relevant exception(s). This class is intended to be used by clients who wish to catch either of the two specific exceptions in a single catch() clause. If you need to throw this error as a COM exception use the error number: 0x80040400. A format string used to create the exception's human-readable message. Create a new exception object and identify the specified driver property or method as the source. The name of the driver property/accessor or method that caused the exception Create a new exception object and identify the specified driver property as the source, and include an inner exception object containing a caught exception. The name of the driver property/accessor or method that caused the exception The caught exception Added to keep Code analysis happy, please don't use it. Added to keep Code Analysis happy The property/accessor or method that is not implemented This exception should be used to indicate that movement (or other invalid operation) was attempted while the device was in a parked state. If you need to throw this error as a COM exception use the error number: 0x80040408. Initializes a new instance of the class using default error text and error codes. Initializes a new instance of the class with a caught (inner) exception. The inner. Create a new exception Exception description Create a new exception Exception description Underlying exception that caused this exception to be thrown. Added to keep Code Analysis happy All properties defined by the relevant ASCOM standard interface must exist in each driver. However, those properties do not all have to be implemented. The minimum requirement for each defined property is to throw the ASCOM.PropertyNotImplementedException for each of its accessors. Note that no default constructor is supplied. Throwing this requires both the property name and unimplemented accessor type to be supplied. If you need to throw this error as a COM exception use the error number: 0x80040400. Create a new exception object and identify the specified driver property and accessor as the source. The name of the driver property that caused the exception. True if the exception is being thrown for the 'set' accessor, else false Create a new exception object and identify the specified driver property as the source, and include an inner exception object containing a caught exception. The name of the driver property that caused the exception True if the exception is being thrown for the 'set' accessor, else false The caught exception Create a new exception Exception description Underlying exception that caused this exception to be thrown. Create a new exception Create a new exception Exception description Initializes a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. The parameter is null. The class name is null or is zero (0). The property that is not implemented True if the 'set' accessor is not implemented, else false This exception should be used to indicate that movement (or other invalid operation) was attempted while the device was in slaved mode. This applies primarily to domes drivers. If you need to throw this error as a COM exception use the error number: 0x80040409. Initializes a new instance of the class. Initializes a new instance of the class with a caught (inner) exception. Inner exception Create a new exception Exception description Create a new exception Exception description Underlying exception that caused this exception to be thrown. Create a new exception Information required to serialise the exception Information of the serialising stream context. Exception to report that no value has yet been set for this property. If you need to throw this error as a COM exception use the error number: 0x80040402. Create a new exception object and identify the specified driver property or method as the source. The name of the driver property/accessor or method that caused the exception Create a new exception object and identify the specified driver property as the source, and include an inner exception object containing a caught exception. The name of the driver property/accessor or method that caused the exception The caught exception Added to keep Code Analysis happy Added to keep Code Analysis happy The property/accessor or method that has no value