timer_lib/
errors.rs

1//! Error handling module for TimerLib.
2
3use thiserror::Error;
4
5/// Custom error type for Timer operations.
6#[derive(Error, Debug)]
7pub enum TimerError {
8    /// Invalid parameter provided.
9    #[error("Invalid parameter: {0}")]
10    InvalidParameter(String),
11
12    /// Operation attempted on a stopped timer.
13    #[error("Operation attempted on a stopped timer.")]
14    TimerStopped,
15
16    /// Callback execution failed.
17    #[error("Callback execution failed: {0}")]
18    CallbackError(String),
19}