Skip to content

Commit

Permalink
Remove legacy error variants
Browse files Browse the repository at this point in the history
Confirmed those shouldn't be in Alpaca in ASCOMInitiative/ASCOMRemote#57.

Unspecified error is kept for internal client use only.
  • Loading branch information
RReverser committed Aug 25, 2024
1 parent 500f882 commit 5fed01a
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 5fed01a

Please sign in to comment.