diff options
author | Nikita Popov <nikic@php.net> | 2015-04-02 18:52:32 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2015-04-06 11:27:34 +0200 |
commit | 122d759618a42bff105971b923fbbb5be02e34b9 (patch) | |
tree | fd4487414ffa3f120c77b19b9eb7dc409659c57e /ext/intl/intl_error.h | |
parent | 884b0365dbe718f667d048dbc3d1cd9d9f12ab84 (diff) | |
download | php-git-122d759618a42bff105971b923fbbb5be02e34b9.tar.gz |
Always throw TypeException on throwing zpp failures
Introduces a ZEND_PARSE_PARAMS_THROW flag for zpp, which forces to
report FAILURE errors using a TypeException instead of a Warning,
like it would happen in strict mode.
Adds a zend_parse_parameters_throw() convenience function, which
invokes zpp with this flag.
Converts all cases I could identify, where we currently have
throwing zpp usage in constructors and replaces them with this API.
Error handling is still replaced to EH_THROW in some cases to handle
other, domain-specific errors in constructors.
Diffstat (limited to 'ext/intl/intl_error.h')
-rw-r--r-- | ext/intl/intl_error.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/intl/intl_error.h b/ext/intl/intl_error.h index 02d62f0299..b65bb2abee 100644 --- a/ext/intl/intl_error.h +++ b/ext/intl/intl_error.h @@ -35,16 +35,16 @@ intl_error* intl_error_create( void ); void intl_error_init( intl_error* err ); void intl_error_reset( intl_error* err ); void intl_error_set_code( intl_error* err, UErrorCode err_code ); -void intl_error_set_custom_msg( intl_error* err, char* msg, int copyMsg ); -void intl_error_set( intl_error* err, UErrorCode code, char* msg, int copyMsg ); +void intl_error_set_custom_msg( intl_error* err, const char* msg, int copyMsg ); +void intl_error_set( intl_error* err, UErrorCode code, const char* msg, int copyMsg ); UErrorCode intl_error_get_code( intl_error* err ); zend_string* intl_error_get_message( intl_error* err ); // Wrappers to synchonize object's and global error structures. void intl_errors_reset( intl_error* err ); -void intl_errors_set_custom_msg( intl_error* err, char* msg, int copyMsg ); +void intl_errors_set_custom_msg( intl_error* err, const char* msg, int copyMsg ); void intl_errors_set_code( intl_error* err, UErrorCode err_code ); -void intl_errors_set( intl_error* err, UErrorCode code, char* msg, int copyMsg ); +void intl_errors_set( intl_error* err, UErrorCode code, const char* msg, int copyMsg ); // Other error helpers smart_str intl_parse_error_to_string( UParseError* pe ); |