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.
158
158
159
159
.. code-block :: cpp
160
160
161
- #include <bind.h>
161
+ #include <emscripten/ bind.h>
162
162
163
163
std::string getExceptionMessage(intptr_t exceptionPtr) {
164
164
return std::string(reinterpret_cast<std::exception *>(exceptionPtr)->what());
@@ -168,6 +168,7 @@ returns the ``what`` function call result.
168
168
emscripten::function("getExceptionMessage", &getExceptionMessage);
169
169
};
170
170
171
+ This requires using the linker flag ``--bind ``.
171
172
Once such a function has been created, exception handling code in javascript
172
173
can call it when receiving an exception from WASM. Here the function is used
173
174
in order to log the thrown exception.
You can’t perform that action at this time.
0 commit comments