From 5fed01ac32ca2f23a10dabb0cc9e62da3b5b7c78 Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Sun, 25 Aug 2024 19:01:08 +0100 Subject: [PATCH] Remove legacy error variants Confirmed those shouldn't be in Alpaca in https://github.com/ASCOMInitiative/ASCOMRemote/issues/57. Unspecified error is kept for internal client use only. --- src/errors.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/errors.rs b/src/errors.rs index 52e450f..046618d 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -178,16 +178,18 @@ ascom_error_codes! { NOT_CONNECTED = 0x407, #[doc = "Property or method not implemented"] NOT_IMPLEMENTED = 0x400, - #[doc = "The requested item is not present in the ASCOM cache"] - NOT_IN_CACHE = 0x40D, - #[doc = "Settings error"] - SETTINGS = 0x40A, - #[doc = "Unspecified error"] - UNSPECIFIED = 0x4FF, #[doc = "A value has not been set"] VALUE_NOT_SET = 0x402, } +impl ASCOMErrorCode { + /// Unspecified error. + /// + /// Exists to map internal client errors to the Alpaca error structure. + /// Internal use only. + pub(crate) const UNSPECIFIED: Self = Self(0x4FF); +} + impl ASCOMError { /// Create a new "invalid operation" error with the specified message. pub fn invalid_operation(message: impl std::fmt::Display) -> Self {