MCPcopy
hub / github.com/Pradumnasaraf/DevOps / handleException

Function handleException

docs/webassembly/files/apps/hello-world/hello.js:1120–1136  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

1118 };
1119
1120 var handleException = (e) => {
1121 // Certain exception types we do not treat as errors since they are used for
1122 // internal control flow.
1123 // 1. ExitStatus, which is thrown by exit()
1124 // 2. "unwind", which is thrown by emscripten_unwind_to_js_event_loop() and others
1125 // that wish to return to JS event loop.
1126 if (e instanceof ExitStatus || e == 'unwind') {
1127 return EXITSTATUS;
1128 }
1129 checkStackCookie();
1130 if (e instanceof WebAssembly.RuntimeError) {
1131 if (_emscripten_stack_get_current() <= 0) {
1132 err('Stack overflow detected. You can try increasing -sSTACK_SIZE (currently set to 65536)');
1133 }
1134 }
1135 quit_(1, e);
1136 };
1137function checkIncomingModuleAPI() {
1138 ignoredModuleProp('fetchSettings');
1139}

Callers 1

callMainFunction · 0.85

Calls 3

checkStackCookieFunction · 0.85
quit_Function · 0.85

Tested by

no test coverage detected