Skip to content

Commit 31ff576

Browse files
authored
Error message improvement (#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 7f3e0df commit 31ff576

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

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)