Commit 63dc7a3
committed
Fix the handling of call traces for exceptions of native functions
Due to the multiple prototypes being tried in chain, native functions
are throwing errors even in valid code, which will be swallowed when
finding a compatible prototype. In case of failure, the catched
exception message is sent back to the throwError API. This has 2
effects:
- due to the double usage of throwError, the details about the location
and call trace get duplicated in the final message
- computing the call trace message is very costly due to the size of the
call trace. Computing it for exceptions which will be swallowed is an
useless performance hit.
Places catching exceptions are now toggling a flag which tells
throwError to skip adding the details. This avoids both the performance
hit of multiple prototypes and the duplicated details (as the first call
to throwError is now done with the flag toggled).1 parent c6626ee commit 63dc7a3
1 file changed
+22
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
| |||
255 | 256 | | |
256 | 257 | | |
257 | 258 | | |
| 259 | + | |
258 | 260 | | |
259 | 261 | | |
260 | 262 | | |
| |||
1564 | 1566 | | |
1565 | 1567 | | |
1566 | 1568 | | |
| 1569 | + | |
| 1570 | + | |
1567 | 1571 | | |
1568 | 1572 | | |
1569 | 1573 | | |
1570 | 1574 | | |
1571 | 1575 | | |
| 1576 | + | |
1572 | 1577 | | |
1573 | 1578 | | |
1574 | 1579 | | |
| |||
4737 | 4742 | | |
4738 | 4743 | | |
4739 | 4744 | | |
4740 | | - | |
4741 | | - | |
4742 | | - | |
4743 | | - | |
4744 | | - | |
4745 | | - | |
4746 | | - | |
4747 | 4745 | | |
4748 | 4746 | | |
4749 | 4747 | | |
4750 | 4748 | | |
4751 | | - | |
| 4749 | + | |
| 4750 | + | |
| 4751 | + | |
| 4752 | + | |
| 4753 | + | |
| 4754 | + | |
| 4755 | + | |
4752 | 4756 | | |
4753 | | - | |
| 4757 | + | |
4754 | 4758 | | |
4755 | | - | |
4756 | | - | |
| 4759 | + | |
| 4760 | + | |
| 4761 | + | |
| 4762 | + | |
| 4763 | + | |
4757 | 4764 | | |
4758 | 4765 | | |
4759 | 4766 | | |
| |||
5026 | 5033 | | |
5027 | 5034 | | |
5028 | 5035 | | |
| 5036 | + | |
| 5037 | + | |
| 5038 | + | |
5029 | 5039 | | |
5030 | 5040 | | |
5031 | 5041 | | |
| |||
5063 | 5073 | | |
5064 | 5074 | | |
5065 | 5075 | | |
| 5076 | + | |
5066 | 5077 | | |
5067 | 5078 | | |
5068 | 5079 | | |
| |||
0 commit comments