diff --git a/bindings/rust/src/lib.rs b/bindings/rust/src/lib.rs index 186d95c6a..800abf031 100644 --- a/bindings/rust/src/lib.rs +++ b/bindings/rust/src/lib.rs @@ -219,7 +219,9 @@ impl Module { // TODO: support imported functions pub fn instantiate(self) -> Result { if !self.owned { - return Err("Not owned".into()); + return Err(Error::InstantiationFailed( + "Trying to instantiate not owned module".into(), + )); } let mut err = FizzyErrorBox::new(); let ptr = unsafe {