Closed
Description
When I use throw in C++ and receive it in browser, some browser occured this problem.
Chrome can solve exception correctly, but Firefox failed.
Here's error information:
TypeError: setting getter-only property "stack"
___throw_exception_with_stack_trace libsirius.js:1303
Module libsirius.js:714
onchange Edit.vue:149
uploadChart Edit.vue:133
click Edit.vue:215
patchStopImmediatePropagation runtime-dom.esm-bundler.js:613
callWithErrorHandling runtime-core.esm-bundler.js:158
callWithAsyncErrorHandling runtime-core.esm-bundler.js:166
callWithAsyncErrorHandling runtime-core.esm-bundler.js:176
invoker runtime-dom.esm-bundler.js:595
addEventListener runtime-dom.esm-bundler.js:549
patchEvent runtime-dom.esm-bundler.js:564
patchProp runtime-dom.esm-bundler.js:627
mountElement runtime-core.esm-bundler.js:5256
processElement runtime-core.esm-bundler.js:5203
patch runtime-core.esm-bundler.js:5075
componentUpdateFn runtime-core.esm-bundler.js:5755
run reactivity.esm-bundler.js:178
update runtime-core.esm-bundler.js:5861
setupRenderEffect runtime-core.esm-bundler.js:5869
mountComponent runtime-core.esm-bundler.js:5659
processComponent runtime-core.esm-bundler.js:5612
patch runtime-core.esm-bundler.js:5087
mountChildren runtime-core.esm-bundler.js:5331
mountElement runtime-core.esm-bundler.js:5238
processElement runtime-core.esm-bundler.js:5203
patch runtime-core.esm-bundler.js:5075
mountChildren runtime-core.esm-bundler.js:5331
processFragment runtime-core.esm-bundler.js:5546
patch runtime-core.esm-bundler.js:5061
mountChildren runtime-core.esm-bundler.js:5331
mountElement runtime-core.esm-bundler.js:5238
processElement runtime-core.esm-bundler.js:5203
patch runtime-core.esm-bundler.js:5075
componentUpdateFn runtime-core.esm-bundler.js:5755
run reactivity.esm-bundler.js:178
update runtime-core.esm-bundler.js:5861
setupRenderEffect runtime-core.esm-bundler.js:5869
mountComponent runtime-core.esm-bundler.js:5659
processComponent runtime-core.esm-bundler.js:5612
___throw_exception_with_stack_trace@http://127.0.0.1:5173/src/utils/libsirius.js?t=1704821839261:1303:23
libsirius.wasm.__cxa_throw@http://127.0.0.1:5173/src/utils/libsirius.wasm:wasm-function[1924]:0x44b16
libsirius.wasm.getLine(char, char, int)@http://127.0.0.1:5173/src/utils/libsirius.wasm:wasm-function[33]:0x801e
libsirius.wasm.fromSUS(std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char>>)@http://127.0.0.1:5173/src/utils/libsirius.wasm:wasm-function[34]:0xd61b
libsirius.wasm.sus2txt@http://127.0.0.1:5173/src/utils/libsirius.wasm:wasm-function[52]:0x150f4
Module/createExportWrapper/Module@http://127.0.0.1:5173/src/utils/libsirius.js?t=1704821839261:714:14
setup/uploadChart/input.onchange@http://127.0.0.1:5173/src/views/Chart/Edit.vue?t=1704821839261:154:34
async*uploadChart@http://127.0.0.1:5173/src/views/Chart/Edit.vue?t=1704821839261:138:2
click@http://127.0.0.1:5173/src/views/Chart/Edit.vue?t=1704821839261:220:16
patchStopImmediatePropagation/</<@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:9769:60
callWithErrorHandling@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:1552:18
callWithAsyncErrorHandling@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:1560:38
callWithAsyncErrorHandling@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:1570:17
invoker@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:9751:31
EventListener.handleEvent*addEventListener@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:9705:6
patchEvent@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:9720:23
patchProp@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:9782:17
mountElement@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:6635:24
processElement@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:6582:19
patch@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:6454:25
componentUpdateFn@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:7136:16
run@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:422:19
baseCreateRenderer/setupRenderEffect/instance.update@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:7242:52
setupRenderEffect@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:7250:5
mountComponent@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:7040:22
processComponent@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:6993:23
patch@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:6466:27
mountChildren@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:6710:12
mountElement@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:6617:20
processElement@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:6582:19
patch@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:6454:25
mountChildren@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:6710:12
processFragment@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:6927:20
patch@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:6440:24
mountChildren@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:6710:12
mountElement@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:6617:20
processElement@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:6582:19
patch@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:6454:25
componentUpdateFn@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:7136:16
run@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:422:19
baseCreateRenderer/setupRenderEffect/instance.update@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:7242:52
setupRenderEffect@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:7250:5
mountComponent@http://127.0.0.1:5173/node_modules/.vite/deps/chunk-EYMNJ3H6.js?v=2dc6a857:7040:22
Here's my compilation command:
emcc emscripten.cpp -o libsirius.js -s MODULARIZE -sALLOW_MEMORY_GROWTH -s EXPORT_ES6=1\
-sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE=['$stringToNewUTF8','$UTF8ToString']\
-sEXPORTED_RUNTIME_METHODS=['stringToNewUTF8','UTF8ToString']\
-fwasm-exceptions -sASSERTIONS\
-L./lib -ljsoncpp -g -O3
C++ Source File: emscripten.cpp
JavaScript Source File: Edit.vue
I didn't find any other issues have asked this problem. So if there have any, please give me the link. Sorry for the disturbence.
Metadata
Metadata
Assignees
Labels
No labels