textiler_core/
error.rs

1//! Contains the main error type
2
3use std::string::FromUtf8Error;
4use web_sys::wasm_bindgen::JsValue;
5
6#[derive(Debug, thiserror::Error)]
7pub enum Error {
8    #[cfg(target_arch = "wasm32")]
9    #[error("Web error: {0:?}")]
10    Web(Option<JsValue>),
11    #[error("Mounting not supported on this architecture")]
12    MountingUnsupported,
13    #[error("an error occurred while trying to convert sx to css")]
14    SxToCssError,
15    #[error(transparent)]
16    IoError(#[from] std::io::Error),
17    #[error(transparent)]
18    FromUtf8Error(#[from] FromUtf8Error),
19}