wardstone/
error.rs

1//! Sandbox error types
2
3use thiserror::Error;
4
5/// Errors that can occur during sandbox operations
6#[derive(Debug, Error)]
7pub enum SandboxError {
8    /// Sandbox not available on this platform
9    #[error("Sandbox not available: {0}")]
10    NotAvailable(String),
11
12    /// Failed to create sandbox policy
13    #[error("Policy error: {0}")]
14    PolicyError(String),
15
16    /// Failed to apply sandbox
17    #[error("Failed to apply sandbox: {0}")]
18    ApplyError(String),
19
20    /// Permission denied by sandbox
21    #[error("Permission denied: {0}")]
22    PermissionDenied(String),
23
24    /// IO error
25    #[error("IO error: {0}")]
26    IoError(#[from] std::io::Error),
27}