diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b000feea19..93857f7d870 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Blocks of changes will separated by version increments. ## **[Unreleased]** +- [#467](https://github.com/wasmerio/wasmer/pull/467) `wasmer_instantiate` returns better error messages in the runtime C API - [#463](https://github.com/wasmerio/wasmer/pull/463) Fix bug in WASI path_open allowing one level above preopened dir to be accessed - [#461](https://github.com/wasmerio/wasmer/pull/461) Prevent passing negative lengths in various places in the runtime C API - [#459](https://github.com/wasmerio/wasmer/pull/459) Add monotonic and real time clocks for wasi on windows diff --git a/lib/runtime-c-api/src/instance.rs b/lib/runtime-c-api/src/instance.rs index dfd7f2a14ce..e9611307d0b 100644 --- a/lib/runtime-c-api/src/instance.rs +++ b/lib/runtime-c-api/src/instance.rs @@ -99,12 +99,8 @@ pub unsafe extern "C" fn wasmer_instantiate( let result = wasmer_runtime::instantiate(bytes, &import_object); let new_instance = match result { Ok(instance) => instance, - Err(_error) => { - // TODO the trait bound `wasmer_runtime::error::Error: std::error::Error` is not satisfied - //update_last_error(error); - update_last_error(CApiError { - msg: "error instantiating".to_string(), - }); + Err(error) => { + update_last_error(error); return wasmer_result_t::WASMER_ERROR; } };