Clean up error handling in the C API

This commit is contained in:
Amanieu d'Antras
2021-11-23 16:11:26 +00:00
parent a603c33def
commit e2c6a39d37
7 changed files with 34 additions and 72 deletions

View File

@@ -74,7 +74,7 @@ pub unsafe extern "C" fn wasm_instance_new(
}
Err(e @ InstantiationError::CpuFeature(_)) => {
crate::error::update_last_error(e.to_string());
crate::error::update_last_error(e);
return None;
}