torrust_tracker_deployer_lib/infrastructure/trace/writer/error.rs
1//! Trace writer error types
2//!
3//! Defines errors that can occur during trace file writing operations.
4
5use thiserror::Error;
6
7/// Errors that can occur during trace file writing
8#[derive(Debug, Error)]
9pub enum TraceWriterError {
10 /// Failed to create the traces directory
11 #[error("Failed to create traces directory at {path}: {source}")]
12 DirectoryCreation {
13 /// Path where directory creation was attempted
14 path: String,
15
16 /// Underlying I/O error
17 #[source]
18 source: std::io::Error,
19 },
20
21 /// Failed to write a trace file
22 #[error("Failed to write trace file at {path}: {source}")]
23 FileWrite {
24 /// Path where file write was attempted
25 path: String,
26
27 /// Underlying I/O error
28 #[source]
29 source: std::io::Error,
30 },
31}