mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
block: Add error module skeleton
Introduce error.rs as the home for a unified error hierarchy that will replace the per format error types at the public crate boundary. This commit is intentionally empty beyond the copyright header and module declaration in lib.rs. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
623af62743
commit
f184a0f0f3
17
block/src/error.rs
Normal file
17
block/src/error.rs
Normal file
@@ -0,0 +1,17 @@
|
||||
// Copyright 2025 The Cloud Hypervisor Authors. All rights reserved.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
//! Unified error handling for the block crate.
|
||||
//!
|
||||
//! # Architecture
|
||||
//!
|
||||
//! ```text
|
||||
//! BlockError -- single public error type
|
||||
//! |-- BlockErrorKind -- small, stable, matchable classification
|
||||
//! |-- ErrorContext -- optional diagnostic metadata (path, offset, op)
|
||||
//! +-- source -- format-specific error (boxed)
|
||||
//! |-- QcowError
|
||||
//! |-- VhdError / RawError / ...
|
||||
//! +-- io::Error / etc.
|
||||
//! ```
|
||||
@@ -9,6 +9,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause
|
||||
|
||||
pub mod async_io;
|
||||
pub mod error;
|
||||
pub mod fcntl;
|
||||
pub mod fixed_vhd;
|
||||
#[cfg(feature = "io_uring")]
|
||||
|
||||
Reference in New Issue
Block a user