Lines Matching refs:error
31 intl_error error; member
45 #define THROW_UFAILURE(obj, fname, error) php_converter_throw_failure(obj, error, \ argument
46 … fname "() returned error " ZEND_LONG_FMT ": %s", (zend_long)error, u_errorName(error))
49 static inline void php_converter_throw_failure(php_converter_object *objval, UErrorCode error, cons… in php_converter_throw_failure() argument
50 intl_error *err = objval ? &(objval->error) : NULL; in php_converter_throw_failure()
58 intl_errors_set(err, error, message, 1); in php_converter_throw_failure()
63 …oid php_converter_default_callback(zval *return_value, zval *zobj, zend_long reason, zval *error) { in php_converter_default_callback() argument
79 ZEND_TRY_ASSIGN_REF_LONG(error, U_INVALID_STATE_ERROR); in php_converter_default_callback()
98 ZEND_TRY_ASSIGN_REF_LONG(error, uerror); in php_converter_default_callback()
109 zval *error; in PHP_METHOD() local
115 Z_PARAM_ZVAL(error) in PHP_METHOD()
118 php_converter_default_callback(return_value, ZEND_THIS, reason, error); in PHP_METHOD()
125 zval *source, *error; in PHP_METHOD() local
132 Z_PARAM_ZVAL(error) in PHP_METHOD()
135 php_converter_default_callback(return_value, ZEND_THIS, reason, error); in PHP_METHOD()
331 UErrorCode error = U_ZERO_ERROR; in php_converter_set_callbacks() local
341 NULL, NULL, &error); in php_converter_set_callbacks()
342 if (U_FAILURE(error)) { in php_converter_set_callbacks()
343 THROW_UFAILURE(objval, "ucnv_setToUCallBack", error); in php_converter_set_callbacks()
347 error = U_ZERO_ERROR; in php_converter_set_callbacks()
349 NULL, NULL, &error); in php_converter_set_callbacks()
350 if (U_FAILURE(error)) { in php_converter_set_callbacks()
351 THROW_UFAILURE(objval, "ucnv_setFromUCallBack", error); in php_converter_set_callbacks()
362 UErrorCode error = U_ZERO_ERROR; in php_converter_set_encoding() local
363 UConverter *cnv = ucnv_open(enc, &error); in php_converter_set_encoding()
365 if (error == U_AMBIGUOUS_ALIAS_WARNING) { in php_converter_set_encoding()
373 } else if (U_FAILURE(error)) { in php_converter_set_encoding()
375 THROW_UFAILURE(objval, "ucnv_open", error); in php_converter_set_encoding()
377 …p_error_docref(NULL, E_WARNING, "Error setting encoding: %d - %s", (int)error, u_errorName(error)); in php_converter_set_encoding()
404 intl_errors_reset(&objval->error); in php_converter_do_set_encoding()
430 intl_errors_reset(&objval->error); in php_converter_do_get_encoding()
436 name = ucnv_getName(cnv, &objval->error.code); in php_converter_do_get_encoding()
437 if (U_FAILURE(objval->error.code)) { in php_converter_do_get_encoding()
438 THROW_UFAILURE(objval, "ucnv_getName()", objval->error.code); in php_converter_do_get_encoding()
465 intl_errors_reset(&objval->error); in php_converter_do_get_type()
472 if (U_FAILURE(objval->error.code)) { in php_converter_do_get_type()
473 THROW_UFAILURE(objval, "ucnv_getType", objval->error.code); in php_converter_do_get_type()
547 intl_errors_reset(&objval->error); in PHP_METHOD()
550 UErrorCode error = U_ZERO_ERROR; in PHP_METHOD() local
551 ucnv_setSubstChars(objval->src, chars, chars_len, &error); in PHP_METHOD()
552 if (U_FAILURE(error)) { in PHP_METHOD()
553 THROW_UFAILURE(objval, "ucnv_setSubstChars", error); in PHP_METHOD()
562 UErrorCode error = U_ZERO_ERROR; in PHP_METHOD() local
563 ucnv_setSubstChars(objval->dest, chars, chars_len, &error); in PHP_METHOD()
564 if (U_FAILURE(error)) { in PHP_METHOD()
565 THROW_UFAILURE(objval, "ucnv_setSubstChars", error); in PHP_METHOD()
582 UErrorCode error = U_ZERO_ERROR; in PHP_METHOD() local
585 intl_errors_reset(&objval->error); in PHP_METHOD()
594 ucnv_getSubstChars(objval->src, chars, &chars_len, &error); in PHP_METHOD()
595 if (U_FAILURE(error)) { in PHP_METHOD()
596 THROW_UFAILURE(objval, "ucnv_getSubstChars", error); in PHP_METHOD()
609 UErrorCode error = U_ZERO_ERROR; in php_converter_do_convert() local
621 temp_len = 1 + ucnv_toUChars(src_cnv, NULL, 0, src, src_len, &error); in php_converter_do_convert()
622 if (U_FAILURE(error) && error != U_BUFFER_OVERFLOW_ERROR) { in php_converter_do_convert()
623 THROW_UFAILURE(objval, "ucnv_toUChars", error); in php_converter_do_convert()
629 error = U_ZERO_ERROR; in php_converter_do_convert()
630 temp_len = ucnv_toUChars(src_cnv, temp, temp_len, src, src_len, &error); in php_converter_do_convert()
631 if (U_FAILURE(error)) { in php_converter_do_convert()
632 THROW_UFAILURE(objval, "ucnv_toUChars", error); in php_converter_do_convert()
639 ret_len = ucnv_fromUChars(dest_cnv, NULL, 0, temp, temp_len, &error); in php_converter_do_convert()
640 if (U_FAILURE(error) && error != U_BUFFER_OVERFLOW_ERROR) { in php_converter_do_convert()
641 THROW_UFAILURE(objval, "ucnv_fromUChars", error); in php_converter_do_convert()
649 error = U_ZERO_ERROR; in php_converter_do_convert()
650 ZSTR_LEN(ret) = ucnv_fromUChars(dest_cnv, ZSTR_VAL(ret), ret_len+1, temp, temp_len, &error); in php_converter_do_convert()
652 if (U_FAILURE(error)) { in php_converter_do_convert()
653 THROW_UFAILURE(objval, "ucnv_fromUChars", error); in php_converter_do_convert()
699 intl_errors_reset(&objval->error); in PHP_METHOD()
732 UErrorCode error = U_ZERO_ERROR; in PHP_METHOD() local
737 if (U_SUCCESS(error) && in PHP_METHOD()
740 error = U_ZERO_ERROR; in PHP_METHOD()
741 ucnv_setSubstChars(src_cnv, Z_STRVAL_P(tmpzval), Z_STRLEN_P(tmpzval) & 0x7F, &error); in PHP_METHOD()
743 if (U_SUCCESS(error) && in PHP_METHOD()
746 error = U_ZERO_ERROR; in PHP_METHOD()
747 ucnv_setSubstChars(dest_cnv, Z_STRVAL_P(tmpzval), Z_STRLEN_P(tmpzval) & 0x7F, &error); in PHP_METHOD()
751 if (U_SUCCESS(error) && in PHP_METHOD()
756 if (U_FAILURE(error)) { in PHP_METHOD()
757 THROW_UFAILURE(NULL, "transcode", error); in PHP_METHOD()
779 RETURN_LONG(intl_error_get_code(&(objval->error))); in PHP_METHOD()
789 zend_string *message = intl_error_get_message(&(objval->error)); in PHP_METHOD()
819 UErrorCode error = U_ZERO_ERROR; in PHP_METHOD() local
827 count = ucnv_countAliases(name, &error); in PHP_METHOD()
828 if (U_FAILURE(error)) { in PHP_METHOD()
829 THROW_UFAILURE(NULL, "ucnv_countAliases", error); in PHP_METHOD()
837 error = U_ZERO_ERROR; in PHP_METHOD()
838 alias = ucnv_getAlias(name, i, &error); in PHP_METHOD()
839 if (U_FAILURE(error)) { in PHP_METHOD()
840 THROW_UFAILURE(NULL, "ucnv_getAlias", error); in PHP_METHOD()
859 UErrorCode error = U_ZERO_ERROR; in PHP_METHOD() local
860 const char *name = ucnv_getStandard(i, &error); in PHP_METHOD()
861 if (U_FAILURE(error)) { in PHP_METHOD()
862 THROW_UFAILURE(NULL, "ucnv_getStandard", error); in PHP_METHOD()
883 intl_error_reset(&objval->error); in php_converter_free_object()
894 intl_error_init(&(objval->error)); in php_converter_object_ctor()
913 UErrorCode error = U_ZERO_ERROR; in php_converter_clone_object() local
916 objval->src = ucnv_clone(oldobj->src, &error); in php_converter_clone_object()
918 objval->src = ucnv_safeClone(oldobj->src, NULL, NULL, &error); in php_converter_clone_object()
920 if (U_SUCCESS(error)) { in php_converter_clone_object()
921 error = U_ZERO_ERROR; in php_converter_clone_object()
923 objval->dest = ucnv_clone(oldobj->dest, &error); in php_converter_clone_object()
925 objval->dest = ucnv_safeClone(oldobj->dest, NULL, NULL, &error); in php_converter_clone_object()
929 if (U_FAILURE(error)) { in php_converter_clone_object()