Commit 1f6b136
authored
[EH] Remove 'terminating' from exception message (#17058)
#17003 added "terminating" to exception messages, but some people might
want to use the message in non-terminating cases. This changes
`emscripten_format_exception` to `__get_exception_message`, and
separately adds `__get_terminating_exception_message`. Adds two
underscores not to clash with the global namespace.
`__get_exception_message` prints messages like
```
exception of type char
exception of type std::runtime_error: abc
exception of type myexception: My exception happened
```
`__get_terminating_exception_message` prints messages like
```
terminating with uncaught exception of type char
terminating with uncaught exception of type std::runtime_error: abc
terminating with uncaught exception of type myexception: My exception happened
```1 parent 1bb6a3a commit 1f6b136
File tree
4 files changed
+26
-18
lines changed- src
- system/lib/libcxxabi/src
- tests
4 files changed
+26
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2138 | 2138 | | |
2139 | 2139 | | |
2140 | 2140 | | |
2141 | | - | |
| 2141 | + | |
2142 | 2142 | | |
2143 | 2143 | | |
2144 | 2144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
395 | | - | |
396 | | - | |
397 | | - | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | | - | |
53 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
61 | 69 | | |
62 | 70 | | |
63 | 71 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1608 | 1608 | | |
1609 | 1609 | | |
1610 | 1610 | | |
1611 | | - | |
| 1611 | + | |
1612 | 1612 | | |
1613 | | - | |
1614 | | - | |
| 1613 | + | |
| 1614 | + | |
1615 | 1615 | | |
1616 | 1616 | | |
1617 | 1617 | | |
| |||
1645 | 1645 | | |
1646 | 1646 | | |
1647 | 1647 | | |
1648 | | - | |
| 1648 | + | |
1649 | 1649 | | |
1650 | 1650 | | |
1651 | 1651 | | |
1652 | 1652 | | |
1653 | 1653 | | |
1654 | 1654 | | |
1655 | | - | |
| 1655 | + | |
1656 | 1656 | | |
1657 | 1657 | | |
1658 | 1658 | | |
1659 | 1659 | | |
1660 | 1660 | | |
1661 | 1661 | | |
1662 | 1662 | | |
1663 | | - | |
1664 | | - | |
1665 | | - | |
1666 | | - | |
1667 | | - | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
1668 | 1668 | | |
1669 | 1669 | | |
1670 | 1670 | | |
| |||
0 commit comments