| 7 | |
| 8 | #[derive(Error, Debug, Clone)] |
| 9 | pub enum CatalogError { |
| 10 | #[error("Catalog not found: {0}")] |
| 11 | CatalogNotFound(String), |
| 12 | |
| 13 | #[error("Catalog operation failed: {0}")] |
| 14 | OperationFailed(String), |
| 15 | |
| 16 | #[error("Serialization error: {0}")] |
| 17 | SerializationError(String), |
| 18 | |
| 19 | #[error("Deserialization error: {0}")] |
| 20 | DeserializationError(String), |
| 21 | |
| 22 | #[error("Storage error: {0}")] |
| 23 | StorageError(String), |
| 24 | |
| 25 | #[error("Entity not found: {0}")] |
| 26 | EntityNotFound(String), |
| 27 | |
| 28 | #[error("Entity already exists: {0}")] |
| 29 | EntityAlreadyExists(String), |
| 30 | |
| 31 | #[error("Invalid parameters: {0}")] |
| 32 | InvalidParameters(String), |
| 33 | |
| 34 | #[error("Permission denied: {0}")] |
| 35 | PermissionDenied(String), |
| 36 | |
| 37 | #[error("IO error: {0}")] |
| 38 | IoError(String), |
| 39 | |
| 40 | #[error("Not supported: {0}")] |
| 41 | NotSupported(String), |
| 42 | |
| 43 | #[error("Duplicate entry: {0}")] |
| 44 | DuplicateEntry(String), |
| 45 | |
| 46 | #[error("Not found: {0}")] |
| 47 | NotFound(String), |
| 48 | |
| 49 | #[error("Invalid operation: {0}")] |
| 50 | InvalidOperation(String), |
| 51 | } |
| 52 | |
| 53 | impl From<std::io::Error> for CatalogError { |
| 54 | fn from(err: std::io::Error) -> Self { |
no outgoing calls
no test coverage detected