mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-12 22:05:33 +00:00
Merge #467
467: feat(runtime-c-api) `wasmer_instantiate` raises the source error r=syrusakbary a=Hywan Instead of returning only “error instanting”, `wasmer_instantiate` can return the real error message. Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net> Co-authored-by: Syrus Akbary <me@syrusakbary.com>
This commit is contained in:
commit
e8c9715099
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user