Commit 6600d0e
authored
ext/intl: Refactor error handling (#19196)
This is a comprehensive refactoring of the error mechanism of the Intl extension.
By moving the prefixing of the current method/function being executed to actual error message creation by accessing the execution context, we get the following benefits:
- Accurate error messages indicating *what* call caused the error
- As we *always* "copy" the message, the `copyMsg` arg becomes unused, meaning we can reduce the size of the `intl_error` struct by 4 bytes.
- Saving it as a zend_string means we know the length of the message
- Remove the need to pass around a "function name" `char*` across multiple calls
- Use Intl's exception mechanism to generate exceptions for constructor call
- This removes the need for replacing the error handler
- Which didn't do anything anyway in silent mode, which required throwing non-descriptive exceptions1 parent 03e2613 commit 6600d0e
File tree
102 files changed
+684
-847
lines changed- ext/intl
- breakiterator
- calendar
- collator
- common
- converter
- dateformat
- formatter
- grapheme
- idn
- listformatter
- locale
- msgformat
- normalizer
- resourcebundle
- spoofchecker
- tests
- timezone
- transliterator
- uchar
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
102 files changed
+684
-847
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
| |||
64 | 63 | | |
65 | 64 | | |
66 | 65 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 66 | + | |
71 | 67 | | |
72 | 68 | | |
73 | 69 | | |
| |||
76 | 72 | | |
77 | 73 | | |
78 | 74 | | |
79 | | - | |
| 75 | + | |
80 | 76 | | |
81 | 77 | | |
82 | 78 | | |
83 | 79 | | |
84 | 80 | | |
85 | 81 | | |
86 | | - | |
| 82 | + | |
87 | 83 | | |
88 | 84 | | |
89 | 85 | | |
90 | 86 | | |
91 | 87 | | |
92 | 88 | | |
93 | | - | |
| 89 | + | |
94 | 90 | | |
95 | 91 | | |
96 | 92 | | |
97 | 93 | | |
98 | 94 | | |
99 | 95 | | |
100 | | - | |
| 96 | + | |
101 | 97 | | |
102 | 98 | | |
103 | 99 | | |
104 | 100 | | |
105 | 101 | | |
106 | 102 | | |
107 | | - | |
| 103 | + | |
108 | 104 | | |
109 | 105 | | |
110 | 106 | | |
| |||
149 | 145 | | |
150 | 146 | | |
151 | 147 | | |
152 | | - | |
| 148 | + | |
153 | 149 | | |
154 | 150 | | |
155 | 151 | | |
156 | | - | |
157 | | - | |
| 152 | + | |
158 | 153 | | |
159 | 154 | | |
160 | 155 | | |
| |||
302 | 297 | | |
303 | 298 | | |
304 | 299 | | |
305 | | - | |
| 300 | + | |
306 | 301 | | |
307 | 302 | | |
308 | | - | |
| 303 | + | |
309 | 304 | | |
310 | 305 | | |
311 | 306 | | |
312 | 307 | | |
313 | 308 | | |
314 | 309 | | |
315 | 310 | | |
316 | | - | |
317 | | - | |
| 311 | + | |
318 | 312 | | |
319 | 313 | | |
320 | 314 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | | - | |
| 108 | + | |
110 | 109 | | |
111 | 110 | | |
112 | 111 | | |
| |||
144 | 143 | | |
145 | 144 | | |
146 | 145 | | |
147 | | - | |
148 | | - | |
| 146 | + | |
149 | 147 | | |
150 | 148 | | |
151 | 149 | | |
| |||
169 | 167 | | |
170 | 168 | | |
171 | 169 | | |
172 | | - | |
173 | | - | |
| 170 | + | |
174 | 171 | | |
175 | 172 | | |
176 | 173 | | |
| |||
0 commit comments