From 73ab1c59529692d838125f4b6df87c62d8848fe5 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Mon, 16 Jan 2023 18:02:52 -0500 Subject: [PATCH] Update flags for getting exception messages in docs (#18538) `-lembind` is now preferred over `--bind`. Add `-sEXPORT_EXCEPTION_HANDLING_HELPERS` to export the required symbols, which are now multiple and can vary based on exception handling backend. --- site/source/docs/porting/Debugging.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/source/docs/porting/Debugging.rst b/site/source/docs/porting/Debugging.rst index 0dab9ff93215e..a732178d956d2 100644 --- a/site/source/docs/porting/Debugging.rst +++ b/site/source/docs/porting/Debugging.rst @@ -170,7 +170,7 @@ returns the ``what`` function call result. emscripten::function("getExceptionMessage", &getExceptionMessage); }; -This requires using the linker flag ``--bind``. +This requires using the linker flags ``-lembind -sEXPORT_EXCEPTION_HANDLING_HELPERS``. Once such a function has been created, exception handling code in javascript can call it when receiving an exception from WASM. Here the function is used in order to log the thrown exception.