| 80 | /// Errors that can occur during archive operations. |
| 81 | #[derive(Debug, Error)] |
| 82 | pub enum ArchiveError { |
| 83 | /// The specified state was not found. |
| 84 | #[error("State not found: {state}")] |
| 85 | StateNotFound { |
| 86 | /// The missing state hash. |
| 87 | state: String, |
| 88 | }, |
| 89 | |
| 90 | /// The specified tag was not found. |
| 91 | #[error("Tag not found: {name}")] |
| 92 | TagNotFound { |
| 93 | /// Name of the missing tag. |
| 94 | name: String, |
| 95 | }, |
| 96 | |
| 97 | /// The specified path was not found. |
| 98 | #[error("Path not found: {path}")] |
| 99 | PathNotFound { |
| 100 | /// The missing path. |
| 101 | path: String, |
| 102 | }, |
| 103 | |
| 104 | /// The destination already exists and overwrite is disabled. |
| 105 | #[error("Destination already exists: {path}")] |
| 106 | DestinationExists { |
| 107 | /// Path that exists. |
| 108 | path: PathBuf, |
| 109 | }, |
| 110 | |
| 111 | /// Unsupported archive format. |
| 112 | #[error("Unsupported archive format: {format}")] |
| 113 | UnsupportedFormat { |
| 114 | /// The unsupported format. |
| 115 | format: String, |
| 116 | }, |
| 117 | |
| 118 | /// The archive would be empty (no files to include). |
| 119 | #[error("Archive would be empty - no files match the criteria")] |
| 120 | EmptyArchive, |
| 121 | |
| 122 | /// Maximum file count exceeded. |
| 123 | #[error("Maximum file count ({max}) exceeded")] |
| 124 | TooManyFiles { |
| 125 | /// Maximum allowed files. |
| 126 | max: usize, |
| 127 | }, |
| 128 | |
| 129 | /// Maximum archive size exceeded. |
| 130 | #[error("Maximum archive size ({max} bytes) exceeded")] |
| 131 | TooLarge { |
| 132 | /// Maximum allowed size. |
| 133 | max: u64, |
| 134 | }, |
| 135 | |
| 136 | /// Database error. |
| 137 | #[error("Database error: {0}")] |
| 138 | Database(String), |
| 139 |
nothing calls this directly
no outgoing calls
no test coverage detected