summaryrefslogtreecommitdiff
path: root/ext/intl/dateformat
diff options
context:
space:
mode:
authorSara Golemon <pollita@php.net>2017-06-25 17:44:59 -0400
committerSara Golemon <pollita@php.net>2017-06-25 17:44:59 -0400
commitecaf408d30af119c04c67bf99790655a1e818472 (patch)
treefa204bb491e948c993021f9c51f2f4a3a1ce0205 /ext/intl/dateformat
parente5741da85c72f963e9bdb47707d990cc6cd49ffc (diff)
downloadphp-git-ecaf408d30af119c04c67bf99790655a1e818472.tar.gz
Produce a better exception message when IntlDateFormatter constructor fails.
Diffstat (limited to 'ext/intl/dateformat')
-rw-r--r--ext/intl/dateformat/dateformat_create.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/intl/dateformat/dateformat_create.cpp b/ext/intl/dateformat/dateformat_create.cpp
index 00a5cc593c..e060711ce6 100644
--- a/ext/intl/dateformat/dateformat_create.cpp
+++ b/ext/intl/dateformat/dateformat_create.cpp
@@ -216,7 +216,7 @@ U_CFUNC PHP_METHOD( IntlDateFormatter, __construct )
return_value = getThis();
if (datefmt_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1) == FAILURE) {
if (!EG(exception)) {
- zend_throw_exception(IntlException_ce_ptr, "Constructor failed", 0);
+ zend_throw_exception(IntlException_ce_ptr, ZSTR_VAL(intl_error_get_message(NULL)), intl_error_get_code(NULL));
}
}
zend_restore_error_handling(&error_handling);