Skip to content

Commit 4377fd0

Browse files
loganeklum1n0us
authored andcommitted
Error message improvement (bytecodealliance#4000)
Improve error message in the scenario where the runtime was built with ref types disabled but the module uses reference types feature.
1 parent cf54da3 commit 4377fd0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/iwasm/interpreter/wasm_loader.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4237,7 +4237,10 @@ check_table_index(const WASMModule *module, uint32 table_index, char *error_buf,
42374237
{
42384238
#if WASM_ENABLE_REF_TYPES == 0 && WASM_ENABLE_GC == 0
42394239
if (table_index != 0) {
4240-
set_error_buf(error_buf, error_buf_size, "zero byte expected");
4240+
set_error_buf(
4241+
error_buf, error_buf_size,
4242+
"zero byte expected. The module uses reference types feature "
4243+
"which is disabled in the runtime.");
42414244
return false;
42424245
}
42434246
#endif

0 commit comments

Comments
 (0)