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
64 ZVAL_DEREF(error); in php_converter_default_callback()
65 zval_dtor(error); in php_converter_default_callback()
66 ZVAL_LONG(error, U_ZERO_ERROR); in php_converter_default_callback()
82 ZVAL_LONG(error, U_INVALID_STATE_ERROR); in php_converter_default_callback()
100 ZVAL_LONG(error, uerror); in php_converter_default_callback()
115 ZEND_ARG_INFO(1, error)
119 zval *source, *codeUnits, *error; in PHP_METHOD() local
122 &reason, &source, &codeUnits, &error) == FAILURE) { in PHP_METHOD()
126 php_converter_default_callback(return_value, getThis(), reason, error); in PHP_METHOD()
137 ZEND_ARG_INFO(1, error)
141 zval *source, *codePoint, *error; in PHP_METHOD() local
144 &reason, &source, &codePoint, &error) == FAILURE) { in PHP_METHOD()
148 php_converter_default_callback(return_value, getThis(), reason, error); in PHP_METHOD()
346 UErrorCode error = U_ZERO_ERROR; in php_converter_set_callbacks() local
356 NULL, NULL, &error); in php_converter_set_callbacks()
357 if (U_FAILURE(error)) { in php_converter_set_callbacks()
358 THROW_UFAILURE(objval, "ucnv_setToUCallBack", error); in php_converter_set_callbacks()
362 error = U_ZERO_ERROR; in php_converter_set_callbacks()
364 NULL, NULL, &error); in php_converter_set_callbacks()
365 if (U_FAILURE(error)) { in php_converter_set_callbacks()
366 THROW_UFAILURE(objval, "ucnv_setFromUCallBack", error); in php_converter_set_callbacks()
378 UErrorCode error = U_ZERO_ERROR; in php_converter_set_encoding() local
379 UConverter *cnv = ucnv_open(enc, &error); in php_converter_set_encoding()
381 if (error == U_AMBIGUOUS_ALIAS_WARNING) { in php_converter_set_encoding()
389 } else if (U_FAILURE(error)) { in php_converter_set_encoding()
391 THROW_UFAILURE(objval, "ucnv_open", error); in php_converter_set_encoding()
393 …p_error_docref(NULL, E_WARNING, "Error setting encoding: %d - %s", (int)error, u_errorName(error)); in php_converter_set_encoding()
424 intl_errors_reset(&objval->error); in php_converter_do_set_encoding()
455 intl_errors_reset(&objval->error); in php_converter_do_get_encoding()
461 name = ucnv_getName(cnv, &objval->error.code); in php_converter_do_get_encoding()
462 if (U_FAILURE(objval->error.code)) { in php_converter_do_get_encoding()
463 THROW_UFAILURE(objval, "ucnv_getName()", objval->error.code); in php_converter_do_get_encoding()
495 intl_errors_reset(&objval->error); in php_converter_do_get_type()
502 if (U_FAILURE(objval->error.code)) { in php_converter_do_get_type()
503 THROW_UFAILURE(objval, "ucnv_getType", objval->error.code); in php_converter_do_get_type()
590 intl_errors_reset(&objval->error); in PHP_METHOD()
593 UErrorCode error = U_ZERO_ERROR; in PHP_METHOD() local
594 ucnv_setSubstChars(objval->src, chars, chars_len, &error); in PHP_METHOD()
595 if (U_FAILURE(error)) { in PHP_METHOD()
596 THROW_UFAILURE(objval, "ucnv_setSubstChars", error); in PHP_METHOD()
605 UErrorCode error = U_ZERO_ERROR; in PHP_METHOD() local
606 ucnv_setSubstChars(objval->dest, chars, chars_len, &error); in PHP_METHOD()
607 if (U_FAILURE(error)) { in PHP_METHOD()
608 THROW_UFAILURE(objval, "ucnv_setSubstChars", error); in PHP_METHOD()
628 UErrorCode error = U_ZERO_ERROR; in PHP_METHOD() local
635 intl_errors_reset(&objval->error); in PHP_METHOD()
644 ucnv_getSubstChars(objval->src, chars, &chars_len, &error); in PHP_METHOD()
645 if (U_FAILURE(error)) { in PHP_METHOD()
646 THROW_UFAILURE(objval, "ucnv_getSubstChars", error); in PHP_METHOD()
659 UErrorCode error = U_ZERO_ERROR; in php_converter_do_convert() local
671 temp_len = 1 + ucnv_toUChars(src_cnv, NULL, 0, src, src_len, &error); in php_converter_do_convert()
672 if (U_FAILURE(error) && error != U_BUFFER_OVERFLOW_ERROR) { in php_converter_do_convert()
673 THROW_UFAILURE(objval, "ucnv_toUChars", error); in php_converter_do_convert()
679 error = U_ZERO_ERROR; in php_converter_do_convert()
680 temp_len = ucnv_toUChars(src_cnv, temp, temp_len, src, src_len, &error); in php_converter_do_convert()
681 if (U_FAILURE(error)) { in php_converter_do_convert()
682 THROW_UFAILURE(objval, "ucnv_toUChars", error); in php_converter_do_convert()
689 ret_len = ucnv_fromUChars(dest_cnv, NULL, 0, temp, temp_len, &error); in php_converter_do_convert()
690 if (U_FAILURE(error) && error != U_BUFFER_OVERFLOW_ERROR) { in php_converter_do_convert()
691 THROW_UFAILURE(objval, "ucnv_fromUChars", error); in php_converter_do_convert()
699 error = U_ZERO_ERROR; in php_converter_do_convert()
700 ZSTR_LEN(ret) = ucnv_fromUChars(dest_cnv, ZSTR_VAL(ret), ret_len+1, temp, temp_len, &error); in php_converter_do_convert()
702 if (U_FAILURE(error)) { in php_converter_do_convert()
703 THROW_UFAILURE(objval, "ucnv_fromUChars", error); in php_converter_do_convert()
760 intl_errors_reset(&objval->error); in PHP_METHOD()
799 UErrorCode error = U_ZERO_ERROR; in PHP_METHOD() local
804 if (U_SUCCESS(error) && in PHP_METHOD()
807 error = U_ZERO_ERROR; in PHP_METHOD()
808 ucnv_setSubstChars(src_cnv, Z_STRVAL_P(tmpzval), Z_STRLEN_P(tmpzval) & 0x7F, &error); in PHP_METHOD()
810 if (U_SUCCESS(error) && in PHP_METHOD()
813 error = U_ZERO_ERROR; in PHP_METHOD()
814 ucnv_setSubstChars(dest_cnv, Z_STRVAL_P(tmpzval), Z_STRLEN_P(tmpzval) & 0x7F, &error); in PHP_METHOD()
818 if (U_SUCCESS(error) && in PHP_METHOD()
823 if (U_FAILURE(error)) { in PHP_METHOD()
824 THROW_UFAILURE(NULL, "transcode", error); in PHP_METHOD()
852 RETURN_LONG(intl_error_get_code(&(objval->error))); in PHP_METHOD()
861 zend_string *message = intl_error_get_message(&(objval->error)); in PHP_METHOD()
906 UErrorCode error = U_ZERO_ERROR; in PHP_METHOD() local
916 count = ucnv_countAliases(name, &error); in PHP_METHOD()
917 if (U_FAILURE(error)) { in PHP_METHOD()
918 THROW_UFAILURE(NULL, "ucnv_countAliases", error); in PHP_METHOD()
926 error = U_ZERO_ERROR; in PHP_METHOD()
927 alias = ucnv_getAlias(name, i, &error); in PHP_METHOD()
928 if (U_FAILURE(error)) { in PHP_METHOD()
929 THROW_UFAILURE(NULL, "ucnv_getAlias", error); in PHP_METHOD()
954 UErrorCode error = U_ZERO_ERROR; in PHP_METHOD() local
955 const char *name = ucnv_getStandard(i, &error); in PHP_METHOD()
956 if (U_FAILURE(error)) { in PHP_METHOD()
957 THROW_UFAILURE(NULL, "ucnv_getStandard", error); in PHP_METHOD()
1015 intl_error_reset(&(objval->error)); in php_converter_dtor_object()
1024 intl_error_init(&(objval->error)); in php_converter_object_ctor()
1044 UErrorCode error = U_ZERO_ERROR; in php_converter_clone_object() local
1046 intl_errors_reset(&oldobj->error); in php_converter_clone_object()
1048 objval->src = ucnv_safeClone(oldobj->src, NULL, NULL, &error); in php_converter_clone_object()
1049 if (U_SUCCESS(error)) { in php_converter_clone_object()
1050 error = U_ZERO_ERROR; in php_converter_clone_object()
1051 objval->dest = ucnv_safeClone(oldobj->dest, NULL, NULL, &error); in php_converter_clone_object()
1053 if (U_FAILURE(error)) { in php_converter_clone_object()
1055 THROW_UFAILURE(oldobj, "ucnv_safeClone", error); in php_converter_clone_object()
1057 err_msg = intl_error_get_message(&oldobj->error); in php_converter_clone_object()