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()
370 UErrorCode error = U_ZERO_ERROR; in php_converter_set_encoding() local
371 UConverter *cnv = ucnv_open(enc, &error); in php_converter_set_encoding()
373 if (error == U_AMBIGUOUS_ALIAS_WARNING) { in php_converter_set_encoding()
381 } else if (U_FAILURE(error)) { in php_converter_set_encoding()
383 THROW_UFAILURE(objval, "ucnv_open", error); in php_converter_set_encoding()
385 …p_error_docref(NULL, E_WARNING, "Error setting encoding: %d - %s", (int)error, u_errorName(error)); in php_converter_set_encoding()
411 intl_errors_reset(&objval->error); in php_converter_do_set_encoding()
439 intl_errors_reset(&objval->error); in php_converter_do_get_encoding()
445 name = ucnv_getName(cnv, &objval->error.code); in php_converter_do_get_encoding()
446 if (U_FAILURE(objval->error.code)) { in php_converter_do_get_encoding()
447 THROW_UFAILURE(objval, "ucnv_getName()", objval->error.code); in php_converter_do_get_encoding()
476 intl_errors_reset(&objval->error); in php_converter_do_get_type()
483 if (U_FAILURE(objval->error.code)) { in php_converter_do_get_type()
484 THROW_UFAILURE(objval, "ucnv_getType", objval->error.code); in php_converter_do_get_type()
561 intl_errors_reset(&objval->error); in PHP_METHOD()
564 UErrorCode error = U_ZERO_ERROR; in PHP_METHOD() local
565 ucnv_setSubstChars(objval->src, chars, chars_len, &error); in PHP_METHOD()
566 if (U_FAILURE(error)) { in PHP_METHOD()
567 THROW_UFAILURE(objval, "ucnv_setSubstChars", error); in PHP_METHOD()
576 UErrorCode error = U_ZERO_ERROR; in PHP_METHOD() local
577 ucnv_setSubstChars(objval->dest, chars, chars_len, &error); in PHP_METHOD()
578 if (U_FAILURE(error)) { in PHP_METHOD()
579 THROW_UFAILURE(objval, "ucnv_setSubstChars", error); in PHP_METHOD()
596 UErrorCode error = U_ZERO_ERROR; in PHP_METHOD() local
601 intl_errors_reset(&objval->error); in PHP_METHOD()
610 ucnv_getSubstChars(objval->src, chars, &chars_len, &error); in PHP_METHOD()
611 if (U_FAILURE(error)) { in PHP_METHOD()
612 THROW_UFAILURE(objval, "ucnv_getSubstChars", error); in PHP_METHOD()
625 UErrorCode error = U_ZERO_ERROR; in php_converter_do_convert() local
637 temp_len = 1 + ucnv_toUChars(src_cnv, NULL, 0, src, src_len, &error); in php_converter_do_convert()
638 if (U_FAILURE(error) && error != U_BUFFER_OVERFLOW_ERROR) { in php_converter_do_convert()
639 THROW_UFAILURE(objval, "ucnv_toUChars", error); in php_converter_do_convert()
645 error = U_ZERO_ERROR; in php_converter_do_convert()
646 temp_len = ucnv_toUChars(src_cnv, temp, temp_len, src, src_len, &error); in php_converter_do_convert()
647 if (U_FAILURE(error)) { in php_converter_do_convert()
648 THROW_UFAILURE(objval, "ucnv_toUChars", error); in php_converter_do_convert()
655 ret_len = ucnv_fromUChars(dest_cnv, NULL, 0, temp, temp_len, &error); in php_converter_do_convert()
656 if (U_FAILURE(error) && error != U_BUFFER_OVERFLOW_ERROR) { in php_converter_do_convert()
657 THROW_UFAILURE(objval, "ucnv_fromUChars", error); in php_converter_do_convert()
665 error = U_ZERO_ERROR; in php_converter_do_convert()
666 ZSTR_LEN(ret) = ucnv_fromUChars(dest_cnv, ZSTR_VAL(ret), ret_len+1, temp, temp_len, &error); in php_converter_do_convert()
668 if (U_FAILURE(error)) { in php_converter_do_convert()
669 THROW_UFAILURE(objval, "ucnv_fromUChars", error); in php_converter_do_convert()
714 intl_errors_reset(&objval->error); in PHP_METHOD()
744 UErrorCode error = U_ZERO_ERROR; in PHP_METHOD() local
749 if (U_SUCCESS(error) && in PHP_METHOD()
752 error = U_ZERO_ERROR; in PHP_METHOD()
753 ucnv_setSubstChars(src_cnv, Z_STRVAL_P(tmpzval), Z_STRLEN_P(tmpzval) & 0x7F, &error); in PHP_METHOD()
755 if (U_SUCCESS(error) && in PHP_METHOD()
758 error = U_ZERO_ERROR; in PHP_METHOD()
759 ucnv_setSubstChars(dest_cnv, Z_STRVAL_P(tmpzval), Z_STRLEN_P(tmpzval) & 0x7F, &error); in PHP_METHOD()
763 if (U_SUCCESS(error) && in PHP_METHOD()
768 if (U_FAILURE(error)) { in PHP_METHOD()
769 THROW_UFAILURE(NULL, "transcode", error); in PHP_METHOD()
793 RETURN_LONG(intl_error_get_code(&(objval->error))); in PHP_METHOD()
805 zend_string *message = intl_error_get_message(&(objval->error)); in PHP_METHOD()
836 UErrorCode error = U_ZERO_ERROR; in PHP_METHOD() local
844 count = ucnv_countAliases(name, &error); in PHP_METHOD()
845 if (U_FAILURE(error)) { in PHP_METHOD()
846 THROW_UFAILURE(NULL, "ucnv_countAliases", error); in PHP_METHOD()
854 error = U_ZERO_ERROR; in PHP_METHOD()
855 alias = ucnv_getAlias(name, i, &error); in PHP_METHOD()
856 if (U_FAILURE(error)) { in PHP_METHOD()
857 THROW_UFAILURE(NULL, "ucnv_getAlias", error); in PHP_METHOD()
878 UErrorCode error = U_ZERO_ERROR; in PHP_METHOD() local
879 const char *name = ucnv_getStandard(i, &error); in PHP_METHOD()
880 if (U_FAILURE(error)) { in PHP_METHOD()
881 THROW_UFAILURE(NULL, "ucnv_getStandard", error); in PHP_METHOD()
902 intl_error_reset(&(objval->error)); in php_converter_dtor_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()