summaryrefslogtreecommitdiff
path: root/ext/intl/dateformat/dateformat_create.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ext/intl/dateformat/dateformat_create.cpp')
-rw-r--r--ext/intl/dateformat/dateformat_create.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/intl/dateformat/dateformat_create.cpp b/ext/intl/dateformat/dateformat_create.cpp
index 00a5cc593c..f08e0ed3f3 100644
--- a/ext/intl/dateformat/dateformat_create.cpp
+++ b/ext/intl/dateformat/dateformat_create.cpp
@@ -216,7 +216,9 @@ 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_string *err = intl_error_get_message(NULL);
+ zend_throw_exception(IntlException_ce_ptr, ZSTR_VAL(err), intl_error_get_code(NULL));
+ zend_string_release(err);
}
}
zend_restore_error_handling(&error_handling);