Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ See docs/process.md for more on how version tagging works.
----------------------
- `EXPORT_EXCEPTION_HANDLING_HELPERS` is deprecated and setting it will not do
anything. `getExceptionMessage` is exported anyway when `ASSERTIONS` or
`EXCEPTION_STACK_TRACES` is set, which are set by default at `-O0`. (#26499)
`EXCEPTION_STACK_TRACES` is set, which are set by default at `-O0`. At `-O1`
or above, you can export it separately by
`-sEXPORTED_RUNTIME_METHODS=getExceptionMessage,decrementExceptionRefcount`.
(#26499)
- The deprecated `EMSCRIPTEN` macro is now defined in `emscripten.h` rather than
on the command line (`__EMSCRIPTEN__`, which is built into LLVM, should be
used instead). (#26417)
Expand Down
3 changes: 2 additions & 1 deletion site/source/docs/porting/exceptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ exception thrown``, this code will print ``MyException,My exception thrown``.

``getExceptionMessage`` is available when exceptions are used and either
``-sASSERTIONS`` or ``-sEXCEPTION_STACK_TRACES`` is set, which are by default
true at ``-O0``.
true at ``-O0``. At ``-O1`` or above, you can export it separately by
``-sEXPORTED_RUNTIME_METHODS=getExceptionMessage,decrementExceptionRefcount``.

If the stack pointer has been moved due to stack allocations within the Wasm
function before an exception is thrown, you can use ``stackSave()`` and
Expand Down
2 changes: 1 addition & 1 deletion site/source/docs/tools_reference/settings_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3419,7 +3419,7 @@ these settings please open a bug (or reply to one of the existing bugs).
- ``LEGALIZE_JS_FFI``: to disable JS type legalization use `-sWASM_BIGINT` or `-sSTANDALONE_WASM`
- ``ASYNCIFY_EXPORTS``: please use JSPI_EXPORTS instead
- ``LINKABLE``: under consideration for removal (https://github.com/emscripten-core/emscripten/issues/25262)
- ``EXPORT_EXCEPTION_HANDLING_HELPERS``: getExceptionMessage is automatically exported when ASSERTIONS or EXCEPTION_STACK_TRACES is 1 and throw is used
- ``EXPORT_EXCEPTION_HANDLING_HELPERS``: getExceptionMessage is exported anyway when ASSERTIONS or EXCEPTION_STACK_TRACES is set, which are set by default at -O0. At -O1 or above, you can export it separately by -sEXPORTED_RUNTIME_METHODS=getExceptionMessage,decrementExceptionRefcount.

.. _legacy-settings:

Expand Down
2 changes: 1 addition & 1 deletion tools/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
'LEGALIZE_JS_FFI': 'to disable JS type legalization use `-sWASM_BIGINT` or `-sSTANDALONE_WASM`',
'ASYNCIFY_EXPORTS': 'please use JSPI_EXPORTS instead',
'LINKABLE': 'under consideration for removal (https://github.com/emscripten-core/emscripten/issues/25262)',
'EXPORT_EXCEPTION_HANDLING_HELPERS': 'getExceptionMessage is automatically exported when ASSERTIONS or EXCEPTION_STACK_TRACES is 1 and throw is used',
'EXPORT_EXCEPTION_HANDLING_HELPERS': 'getExceptionMessage is exported anyway when ASSERTIONS or EXCEPTION_STACK_TRACES is set, which are set by default at -O0. At -O1 or above, you can export it separately by -sEXPORTED_RUNTIME_METHODS=getExceptionMessage,decrementExceptionRefcount.',
}

# Settings that don't need to be externalized when serializing to json because they
Expand Down
Loading