Skip to main content

dscode_terminal/
error.rs

1use thiserror::Error;
2
3/// Errors that can occur in terminal operations.
4#[derive(Error, Debug)]
5pub enum TerminalError {
6    /// Failed to create a new terminal instance.
7    #[error("Terminal creation failed: {0}")]
8    CreationFailed(String),
9    /// The requested terminal ID was not found.
10    #[error("Terminal not found: {0}")]
11    NotFound(String),
12    /// An I/O error occurred in the PTY communication.
13    #[error("PTY I/O error: {0}")]
14    PtyError(String),
15    /// The requested terminal profile was not found.
16    #[error("Profile not found: {0}")]
17    ProfileNotFound(String),
18    /// The requested shell binary is not available on this system.
19    #[error("Shell not available: {0}")]
20    ShellNotAvailable(String),
21}