Skip to main content

isr_cache/
error.rs

1/// Error type for the ISR cache.
2#[derive(thiserror::Error, Debug)]
3pub enum Error {
4    /// An I/O error occurred.
5    #[error(transparent)]
6    Io(#[from] std::io::Error),
7
8    /// An error occurred while serializing or deserializing a profile.
9    #[error(transparent)]
10    Serialization(#[from] rkyv::rancor::Error),
11
12    /// An error occurred while serializing or deserializing JSON.
13    #[cfg(feature = "json")]
14    #[error(transparent)]
15    Json(#[from] serde_json::Error),
16
17    /// An error occurred while downloading a symbol file.
18    #[cfg(any(feature = "windows", feature = "linux"))]
19    #[error(transparent)]
20    Downloader(#[from] isr_dl::Error),
21
22    /// An error occurred while parsing PDB symbols.
23    #[cfg(feature = "windows")]
24    #[error(transparent)]
25    Pdb(#[from] isr_pdb::Error),
26
27    /// An error occurred while parsing DWARF symbols.
28    #[cfg(feature = "linux")]
29    #[error(transparent)]
30    Dwarf(#[from] isr_dwarf::Error),
31}