ErrorCodes Class

Error numbers for use by drivers.

Definition

Namespace: ASCOM
Assembly: ASCOM.Exceptions (in ASCOM.Exceptions.dll) Version: 6.0.0.0 (7.0.9999.9999)
C#
public static class ErrorCodes
Inheritance
Object    ErrorCodes

Remarks

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.

Methods

GetExceptionName Return the ASCOM exception name that corresponds to a COM exception

Fields

ActionNotImplementedException Reserved error code (0x8004040C) to indicate that the requested action is not implemented in this driver.
DriverBase The starting value (0x80040500) for driver-specific error numbers.
DriverMax The maximum value (0x80040FFF) for driver-specific error numbers.
InvalidOperationException Reserved error code (0x8004040B) to indicate that the requested operation can not be undertaken at this time.
InvalidValue Reserved error code (0x80040401) for reporting an invalid value.
InvalidWhileParked Reserved error code (0x80040408) used to indicate that the attempted operation is invalid because the mount is currently in a Parked state.
InvalidWhileSlaved Reserved error code (0x80040409) used to indicate that the attempted operation is invalid because the mount is currently in a Slaved state.
NotConnected Reserved error code (0x80040407) used to indicate that the communications channel is not connected.
NotImplemented Reserved error number (0x80040400) for property or method not implemented.
NotInCacheException Reserved error code (0x8004040D) to indicate that the requested item is not present in the ASCOM cache.
OperationCancelled Reserved error code (0x8004040E) to indicate that an in-progress operation has been cancelled.
SettingsProviderError Reserved error code (0x8004040A) related to settings.
UnspecifiedError Reserved 'catch-all' error code (0x800404FF) used when nothing else was specified.
ValueNotSet Reserved error code (0x80040402) for reporting that a value has not been set.

Version Information

.NET

Supported in: .NET 8.0 and later

.NET Standard

Supported in: 2.0

See Also