wasmonkey/
errors.rs

1use std::io;
2
3pub use anyhow::{anyhow, bail, ensure, Error};
4use parity_wasm::elements;
5
6#[allow(dead_code)]
7#[derive(Debug, thiserror::Error)]
8pub enum WError {
9    #[error("Internal error: {0}")]
10    InternalError(&'static str),
11    #[error("Incorrect usage: {0}")]
12    UsageError(&'static str),
13    #[error("{0}")]
14    Io(#[from] io::Error),
15    #[error("{0}")]
16    WAsmError(#[from] elements::Error),
17    #[error("Parse error")]
18    ParseError,
19    #[error("Unsupported")]
20    Unsupported,
21}