[Wasm] Adjust error message for .NET 7 assemblies, JSExport and multi-threading ...
authorJérôme Laban <jlaban@gmail.com>
Tue, 16 May 2023 00:30:38 +0000 (20:30 -0400)
committerGitHub <noreply@github.com>
Tue, 16 May 2023 00:30:38 +0000 (17:30 -0700)
fix: Adjust error message for .NET 7 assemblies, JSExport and multi-threading

src/mono/wasm/runtime/invoke-cs.ts

index 5ab7d46..27b2f33 100644 (file)
@@ -300,7 +300,7 @@ export async function mono_wasm_get_assembly_exports(assembly: string): Promise<
                 }
             }
         } else {
-            mono_assert(!MonoWasmThreads, "JSExport is not supported with assemblies generated with Net7 SDK and multi-threading");
+            mono_assert(!MonoWasmThreads, () => `JSExport with multi-threading enabled is not supported with assembly ${assembly} as it was generated with the .NET 7 SDK`);
             // this needs to stay here for compatibility with assemblies generated in Net7
             // it doesn't have the __GeneratedInitializer class
             cwraps.mono_wasm_runtime_run_module_cctor(asm);