Skip to content

Commit b2a68cc

Browse files
Change errors to warnings when type is not compatible (#79)
* change errors to warnings * specify the type that was not compatible * Avoid vformat, fix indents --------- Co-authored-by: Ashton Meuser <[email protected]>
1 parent 0da4aee commit b2a68cc

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/wasm.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,10 @@ namespace godot {
490490
} case WASM_EXTERN_MEMORY:
491491
memory_context = new godot_wasm::ContextMemory(i, true);
492492
break;
493-
default: FAIL("Import type not implemented", ERR_INVALID_DATA);
493+
case WASM_EXTERN_TABLE:
494+
WARN_PRINT("Tables not implemented for import " + key);
495+
break;
496+
default: WARN_PRINT("Type not implemented for import " + key);
494497
}
495498
}
496499

@@ -513,7 +516,10 @@ namespace godot {
513516
case WASM_EXTERN_MEMORY:
514517
if (memory_context == NULL) memory_context = new godot_wasm::ContextMemory(i, false); // Favour import memory
515518
break;
516-
default: FAIL("Export type not implemented", ERR_INVALID_DATA);
519+
case WASM_EXTERN_TABLE:
520+
WARN_PRINT("Tables not implemented for export " + key);
521+
break;
522+
default: WARN_PRINT("Type not implemented for export " + key);
517523
}
518524
}
519525

0 commit comments

Comments
 (0)