Commit e9f3fe2
committed
Merge pull request atomvm#1959 from bettio/error-handling-rework
Error handling rework
This PR fixes 2 main issues and limitations in exception handling.
- re-rase now works (see also atomvm#1951)
- when a function head doesn't match, arguments are now visible in stacktrace
- when a bad argument is given to a NIF/BIF, arguments are visible in
stacktrace too, this has been implemented starting from
`erlang:integer_to_binary`
This is a huge leap forward in terms of developer experience when debugging
errors.
These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).
SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-laterFile tree
24 files changed
+825
-212
lines changed- libs/jit/src
- src/libAtomVM
- tests
- erlang_tests
- libs/jit
24 files changed
+825
-212
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
| |||
106 | 108 | | |
107 | 109 | | |
108 | 110 | | |
| 111 | + | |
109 | 112 | | |
110 | 113 | | |
111 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
183 | 182 | | |
184 | 183 | | |
185 | | - | |
186 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
187 | 189 | | |
188 | 190 | | |
189 | | - | |
190 | | - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
191 | 198 | | |
192 | | - | |
| 199 | + | |
193 | 200 | | |
194 | | - | |
195 | | - | |
196 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
197 | 206 | | |
198 | | - | |
199 | | - | |
| 207 | + | |
| 208 | + | |
200 | 209 | | |
201 | 210 | | |
202 | 211 | | |
| |||
276 | 285 | | |
277 | 286 | | |
278 | 287 | | |
279 | | - | |
| 288 | + | |
280 | 289 | | |
281 | 290 | | |
282 | 291 | | |
| |||
1034 | 1043 | | |
1035 | 1044 | | |
1036 | 1045 | | |
1037 | | - | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
1038 | 1049 | | |
1039 | 1050 | | |
1040 | 1051 | | |
| |||
1154 | 1165 | | |
1155 | 1166 | | |
1156 | 1167 | | |
1157 | | - | |
| 1168 | + | |
1158 | 1169 | | |
1159 | 1170 | | |
1160 | 1171 | | |
| |||
2020 | 2031 | | |
2021 | 2032 | | |
2022 | 2033 | | |
2023 | | - | |
| 2034 | + | |
2024 | 2035 | | |
2025 | 2036 | | |
2026 | | - | |
| 2037 | + | |
2027 | 2038 | | |
2028 | 2039 | | |
2029 | | - | |
| 2040 | + | |
2030 | 2041 | | |
2031 | 2042 | | |
2032 | 2043 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
105 | 112 | | |
106 | 113 | | |
107 | 114 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
161 | 165 | | |
162 | 166 | | |
163 | 167 | | |
| |||
620 | 624 | | |
621 | 625 | | |
622 | 626 | | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
623 | 653 | | |
624 | 654 | | |
625 | 655 | | |
| |||
0 commit comments