From 17dd7ad6db2a0abcea563e52d26881566b688897 Mon Sep 17 00:00:00 2001 From: Venkkatesh Sekar Date: Mon, 23 Sep 2024 09:22:09 +0200 Subject: [PATCH] panic instead of logging the error --- src/limit_resource.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/limit_resource.rs b/src/limit_resource.rs index 175be20..74183bf 100644 --- a/src/limit_resource.rs +++ b/src/limit_resource.rs @@ -210,8 +210,7 @@ fn limit_heap_memory(m: &mut Module, limit: u32) { { memory.initial = limit; } else { - eprintln!("Unable to restrict Wasm heap memory to {} pages", limit); - return; + panic!("Unable to restrict Wasm heap memory to {} pages", limit); } } memory.maximum = Some(limit);