Skip to content

Define TDX-specific error types #6

@marcelamelara

Description

@marcelamelara

Currently errors are only defined at the entire library-level, but we should add more specific types for some of the sub-modules, like TDX:

#[derive(Debug, Error)]
pub enum TdxDeviceError {
    #[error("Device not found: {0}")]
    DeviceNotFound(String),
    
    #[error("Device not accessible: {0}")]
    DeviceNotAccessible(String),
    
    #[error("Invalid device type: {0}")]
    InvalidDeviceType(String),
    
    #[error("Device operation failed: {0}")]
    OperationFailed(String),
}

Originally posted by @sandlbn in #1 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions