Skip to main content

file_handle/
error.rs

1use std::path::PathBuf;
2
3use thiserror::Error;
4
5#[derive(Debug, Error)]
6pub enum FileHandleError {
7    #[error("Path not found: {0}")]
8    NotFound(PathBuf),
9    #[error("Operation failed: {0}")]
10    OpFailed(String),
11    #[error("I/O error: {0}")]
12    Io(#[from] std::io::Error),
13
14    #[cfg(all(feature = "show", not(target_os = "macos"), not(target_os = "windows")))]
15    #[error("D-Bus error: {0}")]
16    DBus(#[from] zbus::Error),
17
18    #[cfg(feature = "trash")]
19    #[error("Trash error: {0}")]
20    Trash(String),
21}