php-src/ext/intl/collator
Gina Peter Banyard 6600d0e00f
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 exceptions
2025-07-30 16:00:37 +01:00
..
collator.h Declare ext/intl constants in stubs - part 2 (#9219) 2022-08-02 16:55:12 +02:00
collator.stub.php Declare the missing true return types (#13709) 2024-03-16 07:26:37 +01:00
collator_arginfo.h Fix registration of internal readonly child classes (#15459) 2024-08-24 12:36:54 +02:00
collator_attr.c Preferably include from build dir (#13516) 2024-06-26 00:26:43 +02:00
collator_class.c ext/intl: Various refactoring (#14360) 2024-05-30 12:51:36 +01:00
collator_class.h ext/intl: Refactor error handling (#19196) 2025-07-30 16:00:37 +01:00
collator_compare.c ext/intl: Refactor error handling (#19196) 2025-07-30 16:00:37 +01:00
collator_convert.c Avoid string copies in ext/intl after string conversion (#18636) 2025-05-25 12:29:36 +02:00
collator_convert.h Avoid make_printable_zval() in intl collator 2021-06-10 10:12:47 +02:00
collator_create.c ext/intl: Refactor error handling (#19196) 2025-07-30 16:00:37 +01:00
collator_error.c Preferably include from build dir (#13516) 2024-06-26 00:26:43 +02:00
collator_functions_arginfo.h Do not include the same stub multiple times 2020-04-03 14:23:54 +02:00
collator_is_numeric.c Fix GH-18566: [intl] Weird numeric sort in Collator 2025-05-24 14:57:34 +02:00
collator_is_numeric.h zend_compiler, ...: use uint8_t instead of zend_uchar (#10621) 2023-02-23 14:56:54 +00:00
collator_locale.c ext/intl: Refactor error handling (#19196) 2025-07-30 16:00:37 +01:00
collator_sort.c ext/intl: Refactor error handling (#19196) 2025-07-30 16:00:37 +01:00
collator_sort.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00