Add special error types for compile, linking, and runtime errors. (#99)

* Add error types and convert most results to wasmer-runtime results

* Fix spectests

* Fix umbrella project to work with new error types
This commit is contained in:
Lachlan Sneff
2019-01-18 10:54:16 -08:00
committed by GitHub
parent 9c0d78ae46
commit 8a9f5fa61a
18 changed files with 394 additions and 179 deletions

View File

@ -1,5 +1,6 @@
use crate::{
backend::FuncResolver,
error::Result,
import::Imports,
sig_registry::SigRegistry,
structures::Map,
@ -47,7 +48,7 @@ impl Module {
}
/// Instantiate a webassembly module with the provided imports.
pub fn instantiate(&self, imports: Imports) -> Result<Instance, String> {
pub fn instantiate(&self, imports: Imports) -> Result<Instance> {
Instance::new(Rc::clone(&self.0), Box::new(imports))
}
}