summaryrefslogtreecommitdiff
path: root/crates/core/src/error.rs
diff options
context:
space:
mode:
authorHenry Gressmann <mail@henrygressmann.de>2023-11-28 20:16:08 +0100
committerHenry Gressmann <mail@henrygressmann.de>2023-11-28 20:16:08 +0100
commitf26d077b5a8141253f807ea14551852da6842dd1 (patch)
treecc13a6e5620706a2a71143f19512b39c5449cc63 /crates/core/src/error.rs
parentfe76d91f33b2441de87597ae5885ea9005f35b1c (diff)
chore: add wasm spec testsuite
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'crates/core/src/error.rs')
-rw-r--r--crates/core/src/error.rs28
1 files changed, 0 insertions, 28 deletions
diff --git a/crates/core/src/error.rs b/crates/core/src/error.rs
deleted file mode 100644
index b9c93c4..0000000
--- a/crates/core/src/error.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-use alloc::string::{String, ToString};
-use thiserror::Error;
-
-#[derive(Debug, Error)]
-pub enum Error {
- #[error("error parsing module")]
- ParseError { message: String, offset: usize },
-
- #[error("unknown error: {0}")]
- Other(String),
-}
-
-impl Error {
- pub fn other<T>(message: &str) -> Result<T, Self> {
- Err(Self::Other(message.to_string()))
- }
-}
-
-impl From<wasmparser::BinaryReaderError> for Error {
- fn from(value: wasmparser::BinaryReaderError) -> Self {
- Self::ParseError {
- message: value.message().to_string(),
- offset: value.offset(),
- }
- }
-}
-
-pub type Result<T, E = Error> = crate::std::result::Result<T, E>;