MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / makeThrow

Function makeThrow

src/parseTools.mjs:664–679  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

662}
663
664function makeThrow() {
665 if (DISABLE_EXCEPTION_CATCHING) {
666 if (ASSERTIONS) {
667 var assertInfo =
668 'Exception thrown, but exception catching is not enabled. Compile with -sNO_DISABLE_EXCEPTION_CATCHING or -sEXCEPTION_CATCHING_ALLOWED=[..] to catch.';
669 if (MAIN_MODULE) {
670 assertInfo +=
671 ' (note: in dynamic linking, if a side module wants exceptions, the main module must be built with that support)';
672 }
673 return `assert(false, '${assertInfo}');`;
674 } else {
675 return 'abort()';
676 }
677 }
678 return 'throw exceptionLast;';
679}
680
681function charCode(char) {
682 return char.charCodeAt(0);

Callers 1

libexceptions.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected