summaryrefslogtreecommitdiff
path: root/ext/intl/intl_error.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-03-30 18:53:38 +0300
committerDmitry Stogov <dmitry@zend.com>2015-03-30 18:53:38 +0300
commit1018f462d8bb0a12b238d9d11c141038beaf2a6c (patch)
tree6466aa51c3924c5ed56741e02fa323fcb3e2ece4 /ext/intl/intl_error.c
parent9155a267adeeb6f442f97892de441e4b6666ce73 (diff)
downloadphp-git-1018f462d8bb0a12b238d9d11c141038beaf2a6c.tar.gz
Patch improvement:
Removed the corresponding core code. Fixed ext/com_dotnet and ext/date. Refactored ext/intl changes. Improved ext/fileinfo and ext/pdo changes. Fixed tests.
Diffstat (limited to 'ext/intl/intl_error.c')
-rw-r--r--ext/intl/intl_error.c55
1 files changed, 7 insertions, 48 deletions
diff --git a/ext/intl/intl_error.c b/ext/intl/intl_error.c
index 8ea5e7b4cf..a946705a76 100644
--- a/ext/intl/intl_error.c
+++ b/ext/intl/intl_error.c
@@ -103,25 +103,14 @@ void intl_error_reset( intl_error* err )
*/
void intl_error_set_custom_msg( intl_error* err, char* msg, int copyMsg )
{
- intl_error_set_custom_msg_ex( err, msg, copyMsg, 0 );
-}
-/* }}} */
-
-
-/* {{{ void intl_error_set_custom_msg( intl_error* err, char* msg, int copyMsg )
- * Set last error message to msg copying it if needed.
- */
-void intl_error_set_custom_msg_ex( intl_error* err, char* msg, int copyMsg, int forceException )
-{
if( !msg )
return;
if( !err ) {
- if ( forceException || INTL_G( use_exceptions ) ) {
- zend_throw_exception_ex( IntlException_ce_ptr, 0, "%s", msg );
- } else if( INTL_G( error_level ) ) {
+ if( INTL_G( error_level ) )
php_error_docref( NULL, INTL_G( error_level ), "%s", msg );
- }
+ if( INTL_G( use_exceptions ) )
+ zend_throw_exception_ex( IntlException_ce_ptr, 0, "%s", msg );
}
if( !err && !( err = intl_g_error_get( ) ) )
return;
@@ -193,38 +182,18 @@ UErrorCode intl_error_get_code( intl_error* err )
*/
void intl_error_set( intl_error* err, UErrorCode code, char* msg, int copyMsg )
{
- intl_error_set_ex( err, code, msg, copyMsg, 0 );
-}
-/* }}} */
-
-
-/* {{{ void intl_error_set( intl_error* err, UErrorCode code, char* msg, int copyMsg )
- * Set error code and message.
- */
-void intl_error_set_ex( intl_error* err, UErrorCode code, char* msg, int copyMsg, int forceException )
-{
intl_error_set_code( err, code );
- intl_error_set_custom_msg_ex( err, msg, copyMsg, forceException );
+ intl_error_set_custom_msg( err, msg, copyMsg );
}
/* }}} */
-
/* {{{ void intl_errors_set( intl_error* err, UErrorCode code, char* msg, int copyMsg )
* Set error code and message.
*/
void intl_errors_set( intl_error* err, UErrorCode code, char* msg, int copyMsg )
{
- intl_errors_set_ex( err, code, msg, copyMsg, 0 );
-}
-/* }}} */
-
-/* {{{ void intl_errors_set_ex( intl_error* err, UErrorCode code, char* msg, int copyMsg )
- * Set error code and message.
- */
-void intl_errors_set_ex( intl_error* err, UErrorCode code, char* msg, int copyMsg, int forceException )
-{
intl_errors_set_code( err, code );
- intl_errors_set_custom_msg_ex( err, msg, copyMsg, forceException );
+ intl_errors_set_custom_msg( err, msg, copyMsg );
}
/* }}} */
@@ -243,23 +212,13 @@ void intl_errors_reset( intl_error* err )
*/
void intl_errors_set_custom_msg( intl_error* err, char* msg, int copyMsg )
{
- intl_errors_set_custom_msg_ex( err, msg, copyMsg, 0 );
-}
-/* }}} */
-
-
-/* {{{ void intl_errors_set_custom_msg( intl_error* err, char* msg, int copyMsg )
- */
-void intl_errors_set_custom_msg_ex( intl_error* err, char* msg, int copyMsg, int forceException )
-{
if(err) {
- intl_error_set_custom_msg_ex( err, msg, copyMsg, forceException );
+ intl_error_set_custom_msg( err, msg, copyMsg );
}
- intl_error_set_custom_msg_ex( NULL, msg, copyMsg, forceException );
+ intl_error_set_custom_msg( NULL, msg, copyMsg );
}
/* }}} */
-
/* {{{ intl_errors_set_code( intl_error* err, UErrorCode err_code )
*/
void intl_errors_set_code( intl_error* err, UErrorCode err_code )