Lines Matching refs:error

32 	intl_error error;  member
46 #define THROW_UFAILURE(obj, fname, error) php_converter_throw_failure(obj, error, \ argument
47 … fname "() returned error " ZEND_LONG_FMT ": %s", (zend_long)error, u_errorName(error))
50 static inline void php_converter_throw_failure(php_converter_object *objval, UErrorCode error, cons… in php_converter_throw_failure() argument
51 intl_error *err = objval ? &(objval->error) : NULL; in php_converter_throw_failure()
59 intl_errors_set(err, error, message, 1); in php_converter_throw_failure()
64 …oid php_converter_default_callback(zval *return_value, zval *zobj, zend_long reason, zval *error) { in php_converter_default_callback() argument
80 ZEND_TRY_ASSIGN_REF_LONG(error, U_INVALID_STATE_ERROR); in php_converter_default_callback()
99 ZEND_TRY_ASSIGN_REF_LONG(error, uerror); in php_converter_default_callback()
110 zval *error; in PHP_METHOD() local
113 &reason, &source, &codeUnits, &error) == FAILURE) { in PHP_METHOD()
117 php_converter_default_callback(return_value, ZEND_THIS, reason, error); in PHP_METHOD()
124 zval *source, *error; in PHP_METHOD() local
128 &reason, &source, &codePoint, &error) == FAILURE) { in PHP_METHOD()
132 php_converter_default_callback(return_value, ZEND_THIS, reason, error); in PHP_METHOD()
338 UErrorCode error = U_ZERO_ERROR; in php_converter_set_callbacks() local
348 NULL, NULL, &error); in php_converter_set_callbacks()
349 if (U_FAILURE(error)) { in php_converter_set_callbacks()
350 THROW_UFAILURE(objval, "ucnv_setToUCallBack", error); in php_converter_set_callbacks()
354 error = U_ZERO_ERROR; in php_converter_set_callbacks()
356 NULL, NULL, &error); in php_converter_set_callbacks()
357 if (U_FAILURE(error)) { in php_converter_set_callbacks()
358 THROW_UFAILURE(objval, "ucnv_setFromUCallBack", error); in php_converter_set_callbacks()
369 UErrorCode error = U_ZERO_ERROR; in php_converter_set_encoding() local
370 UConverter *cnv = ucnv_open(enc, &error); in php_converter_set_encoding()
372 if (error == U_AMBIGUOUS_ALIAS_WARNING) { in php_converter_set_encoding()
380 } else if (U_FAILURE(error)) { in php_converter_set_encoding()
382 THROW_UFAILURE(objval, "ucnv_open", error); in php_converter_set_encoding()
384 …p_error_docref(NULL, E_WARNING, "Error setting encoding: %d - %s", (int)error, u_errorName(error)); in php_converter_set_encoding()
410 intl_errors_reset(&objval->error); in php_converter_do_set_encoding()
438 intl_errors_reset(&objval->error); in php_converter_do_get_encoding()
444 name = ucnv_getName(cnv, &objval->error.code); in php_converter_do_get_encoding()
445 if (U_FAILURE(objval->error.code)) { in php_converter_do_get_encoding()
446 THROW_UFAILURE(objval, "ucnv_getName()", objval->error.code); in php_converter_do_get_encoding()
475 intl_errors_reset(&objval->error); in php_converter_do_get_type()
482 if (U_FAILURE(objval->error.code)) { in php_converter_do_get_type()
483 THROW_UFAILURE(objval, "ucnv_getType", objval->error.code); in php_converter_do_get_type()
560 intl_errors_reset(&objval->error); in PHP_METHOD()
563 UErrorCode error = U_ZERO_ERROR; in PHP_METHOD() local
564 ucnv_setSubstChars(objval->src, chars, chars_len, &error); in PHP_METHOD()
565 if (U_FAILURE(error)) { in PHP_METHOD()
566 THROW_UFAILURE(objval, "ucnv_setSubstChars", error); in PHP_METHOD()
575 UErrorCode error = U_ZERO_ERROR; in PHP_METHOD() local
576 ucnv_setSubstChars(objval->dest, chars, chars_len, &error); in PHP_METHOD()
577 if (U_FAILURE(error)) { in PHP_METHOD()
578 THROW_UFAILURE(objval, "ucnv_setSubstChars", error); in PHP_METHOD()
595 UErrorCode error = U_ZERO_ERROR; in PHP_METHOD() local
600 intl_errors_reset(&objval->error); in PHP_METHOD()
609 ucnv_getSubstChars(objval->src, chars, &chars_len, &error); in PHP_METHOD()
610 if (U_FAILURE(error)) { in PHP_METHOD()
611 THROW_UFAILURE(objval, "ucnv_getSubstChars", error); in PHP_METHOD()
624 UErrorCode error = U_ZERO_ERROR; in php_converter_do_convert() local
636 temp_len = 1 + ucnv_toUChars(src_cnv, NULL, 0, src, src_len, &error); in php_converter_do_convert()
637 if (U_FAILURE(error) && error != U_BUFFER_OVERFLOW_ERROR) { in php_converter_do_convert()
638 THROW_UFAILURE(objval, "ucnv_toUChars", error); in php_converter_do_convert()
644 error = U_ZERO_ERROR; in php_converter_do_convert()
645 temp_len = ucnv_toUChars(src_cnv, temp, temp_len, src, src_len, &error); in php_converter_do_convert()
646 if (U_FAILURE(error)) { in php_converter_do_convert()
647 THROW_UFAILURE(objval, "ucnv_toUChars", error); in php_converter_do_convert()
654 ret_len = ucnv_fromUChars(dest_cnv, NULL, 0, temp, temp_len, &error); in php_converter_do_convert()
655 if (U_FAILURE(error) && error != U_BUFFER_OVERFLOW_ERROR) { in php_converter_do_convert()
656 THROW_UFAILURE(objval, "ucnv_fromUChars", error); in php_converter_do_convert()
664 error = U_ZERO_ERROR; in php_converter_do_convert()
665 ZSTR_LEN(ret) = ucnv_fromUChars(dest_cnv, ZSTR_VAL(ret), ret_len+1, temp, temp_len, &error); in php_converter_do_convert()
667 if (U_FAILURE(error)) { in php_converter_do_convert()
668 THROW_UFAILURE(objval, "ucnv_fromUChars", error); in php_converter_do_convert()
713 intl_errors_reset(&objval->error); in PHP_METHOD()
743 UErrorCode error = U_ZERO_ERROR; in PHP_METHOD() local
748 if (U_SUCCESS(error) && in PHP_METHOD()
751 error = U_ZERO_ERROR; in PHP_METHOD()
752 ucnv_setSubstChars(src_cnv, Z_STRVAL_P(tmpzval), Z_STRLEN_P(tmpzval) & 0x7F, &error); in PHP_METHOD()
754 if (U_SUCCESS(error) && in PHP_METHOD()
757 error = U_ZERO_ERROR; in PHP_METHOD()
758 ucnv_setSubstChars(dest_cnv, Z_STRVAL_P(tmpzval), Z_STRLEN_P(tmpzval) & 0x7F, &error); in PHP_METHOD()
762 if (U_SUCCESS(error) && in PHP_METHOD()
767 if (U_FAILURE(error)) { in PHP_METHOD()
768 THROW_UFAILURE(NULL, "transcode", error); in PHP_METHOD()
792 RETURN_LONG(intl_error_get_code(&(objval->error))); in PHP_METHOD()
804 zend_string *message = intl_error_get_message(&(objval->error)); in PHP_METHOD()
835 UErrorCode error = U_ZERO_ERROR; in PHP_METHOD() local
843 count = ucnv_countAliases(name, &error); in PHP_METHOD()
844 if (U_FAILURE(error)) { in PHP_METHOD()
845 THROW_UFAILURE(NULL, "ucnv_countAliases", error); in PHP_METHOD()
853 error = U_ZERO_ERROR; in PHP_METHOD()
854 alias = ucnv_getAlias(name, i, &error); in PHP_METHOD()
855 if (U_FAILURE(error)) { in PHP_METHOD()
856 THROW_UFAILURE(NULL, "ucnv_getAlias", error); in PHP_METHOD()
877 UErrorCode error = U_ZERO_ERROR; in PHP_METHOD() local
878 const char *name = ucnv_getStandard(i, &error); in PHP_METHOD()
879 if (U_FAILURE(error)) { in PHP_METHOD()
880 THROW_UFAILURE(NULL, "ucnv_getStandard", error); in PHP_METHOD()
901 intl_error_reset(&objval->error); in php_converter_free_object()
912 intl_error_init(&(objval->error)); in php_converter_object_ctor()
932 UErrorCode error = U_ZERO_ERROR; in php_converter_clone_object() local
934 intl_errors_reset(&oldobj->error); in php_converter_clone_object()
937 objval->src = ucnv_clone(oldobj->src, &error); in php_converter_clone_object()
939 objval->src = ucnv_safeClone(oldobj->src, NULL, NULL, &error); in php_converter_clone_object()
941 if (U_SUCCESS(error)) { in php_converter_clone_object()
942 error = U_ZERO_ERROR; in php_converter_clone_object()
944 objval->dest = ucnv_clone(oldobj->dest, &error); in php_converter_clone_object()
946 objval->dest = ucnv_safeClone(oldobj->dest, NULL, NULL, &error); in php_converter_clone_object()
949 if (U_FAILURE(error)) { in php_converter_clone_object()
951 THROW_UFAILURE(oldobj, "ucnv_safeClone", error); in php_converter_clone_object()
953 err_msg = intl_error_get_message(&oldobj->error); in php_converter_clone_object()