File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ returns the ``what`` function call result.
158158
159159.. code-block :: cpp
160160
161- #include <bind.h>
161+ #include <emscripten/ bind.h>
162162
163163 std::string getExceptionMessage(intptr_t exceptionPtr) {
164164 return std::string(reinterpret_cast<std::exception *>(exceptionPtr)->what());
@@ -168,6 +168,7 @@ returns the ``what`` function call result.
168168 emscripten::function("getExceptionMessage", &getExceptionMessage);
169169 };
170170
171+ This requires using the linker flag ``--bind ``.
171172Once such a function has been created, exception handling code in javascript
172173can call it when receiving an exception from WASM. Here the function is used
173174in order to log the thrown exception.
You can’t perform that action at this time.
0 commit comments