Skip to main content

distrib_js/
error.rs

1// This is free and unencumbered software released into the public domain.
2
3use alloc::{
4    boxed::Box,
5    string::{String, ToString},
6};
7use thiserror::Error;
8
9#[derive(Debug, Error)]
10pub enum LoadPackageError {
11    #[error(transparent)]
12    Other(#[from] Box<dyn core::error::Error>),
13}
14
15#[cfg(feature = "std")]
16impl From<std::io::Error> for LoadPackageError {
17    fn from(error: std::io::Error) -> Self {
18        Self::Other(error.into())
19    }
20}