init() doesn't throw an error if it fails, instead, it rejects a promise. you can catch that by using .catch OR you can wrap this in an async iife and with try { await init(); } catch(e) { webAssemblyFail(e) }. try catch will only catch the rejection if the promise is awaited in the try block
init() doesn't throw an error if it fails, instead, it rejects a promise. you can catch that by using .catch OR you can wrap this in an async iife and with
try { await init(); } catch(e) { webAssemblyFail(e) }
. try catch will only catch the rejection if the promise is awaited in the try block