php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
common_error.c
Go to the documentation of this file.
1/*
2 +----------------------------------------------------------------------+
3 | This source file is subject to version 3.01 of the PHP license, |
4 | that is bundled with this package in the file LICENSE, and is |
5 | available through the world-wide-web at the following url: |
6 | https://www.php.net/license/3_01.txt |
7 | If you did not receive a copy of the PHP license and are unable to |
8 | obtain it through the world-wide-web, please send a note to |
9 | license@php.net so we can mail you a copy immediately. |
10 +----------------------------------------------------------------------+
11 | Authors: Vadim Savchuk <vsavchuk@productengine.com> |
12 | Dmitry Lakhtyuk <dlakhtyuk@productengine.com> |
13 +----------------------------------------------------------------------+
14 */
15
16#ifdef HAVE_CONFIG_H
17#include <config.h>
18#endif
19
20#include "php_intl.h"
21#include "intl_error.h"
22
23/* {{{ Get code of the last occurred error. */
30/* }}} */
31
32/* {{{ Get text description of the last occurred error. */
39/* }}} */
40
41/* {{{ Check whether the given error code indicates a failure.
42 * Returns true if it does, and false if the code
43 * indicates success or a warning.
44 */
46{
47 zend_long err_code;
48
50 Z_PARAM_LONG(err_code)
52
53 RETURN_BOOL( U_FAILURE( err_code ) );
54}
55/* }}} */
56
57/* {{{ Return a string for a given error code.
58 * The string will be the same as the name of the error code constant.
59 */
61{
62 zend_long err_code;
63
65 Z_PARAM_LONG(err_code)
67
68 RETURN_STRING( (char*)u_errorName( err_code ) );
69}
70/* }}} */
#define NULL
Definition gdcache.h:45
UErrorCode intl_error_get_code(intl_error *err)
Definition intl_error.c:151
zend_string * intl_error_get_message(intl_error *err)
Definition intl_error.c:116
#define PHP_FUNCTION
Definition php.h:364
intl_get_error_code()
intl_get_error_message()
intl_error_name(int $errorCode)
intl_is_failure(int $errorCode)
#define RETURN_STRING(s)
Definition zend_API.h:1043
#define ZEND_PARSE_PARAMETERS_END()
Definition zend_API.h:1641
#define ZEND_PARSE_PARAMETERS_NONE()
Definition zend_API.h:1623
#define ZEND_PARSE_PARAMETERS_START(min_num_args, max_num_args)
Definition zend_API.h:1620
#define Z_PARAM_LONG(dest)
Definition zend_API.h:1896
#define RETURN_LONG(l)
Definition zend_API.h:1037
#define RETURN_BOOL(b)
Definition zend_API.h:1035
#define RETURN_STR(s)
Definition zend_API.h:1039
int32_t zend_long
Definition zend_long.h:42