Skip to content

Commit 094b224

Browse files
committed
Rename some _exception APIs to _error
1 parent b708b08 commit 094b224

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

Zend/zend_API.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ ZEND_API zend_string *zend_zval_get_type(const zval *arg) /* {{{ */
167167
}
168168
/* }}} */
169169

170-
ZEND_API ZEND_COLD int ZEND_FASTCALL zend_wrong_parameters_none_exception(void) /* {{{ */
170+
ZEND_API ZEND_COLD int ZEND_FASTCALL zend_wrong_parameters_none_error(void) /* {{{ */
171171
{
172172
int num_args = ZEND_CALL_NUM_ARGS(EG(current_execute_data));
173173
zend_function *active_function = EG(current_execute_data)->func;
@@ -186,7 +186,7 @@ ZEND_API ZEND_COLD int ZEND_FASTCALL zend_wrong_parameters_none_exception(void)
186186
}
187187
/* }}} */
188188

189-
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_count_exception(int min_num_args, int max_num_args) /* {{{ */
189+
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_count_error(int min_num_args, int max_num_args) /* {{{ */
190190
{
191191
int num_args = ZEND_CALL_NUM_ARGS(EG(current_execute_data));
192192
zend_function *active_function = EG(current_execute_data)->func;
@@ -204,7 +204,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_count_exception(int
204204
}
205205
/* }}} */
206206

207-
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_type_exception(int num, zend_expected_type expected_type, zval *arg) /* {{{ */
207+
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_type_error(int num, zend_expected_type expected_type, zval *arg) /* {{{ */
208208
{
209209
const char *space;
210210
const char *class_name = get_active_class_name(&space);
@@ -218,7 +218,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_type_exception(int nu
218218
}
219219
/* }}} */
220220

221-
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_exception(int num, char *name, zval *arg) /* {{{ */
221+
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_error(int num, char *name, zval *arg) /* {{{ */
222222
{
223223
const char *space;
224224
const char *class_name = get_active_class_name(&space);
@@ -228,7 +228,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_exception(int n
228228
}
229229
/* }}} */
230230

231-
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, char *error) /* {{{ */
231+
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_error(int num, char *error) /* {{{ */
232232
{
233233
const char *space;
234234
const char *class_name = get_active_class_name(&space);

Zend/zend_API.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ ZEND_API int zend_copy_parameters_array(int param_count, zval *argument_array);
246246
#define zend_get_parameters_array_ex(param_count, argument_array) \
247247
_zend_get_parameters_array_ex(param_count, argument_array)
248248
#define zend_parse_parameters_none() \
249-
(EXPECTED(ZEND_NUM_ARGS() == 0) ? SUCCESS : zend_wrong_parameters_none_exception())
249+
(EXPECTED(ZEND_NUM_ARGS() == 0) ? SUCCESS : zend_wrong_parameters_none_error())
250250
#define zend_parse_parameters_none_throw() \
251251
zend_parse_parameters_none()
252252

@@ -956,11 +956,11 @@ typedef enum _zend_expected_type {
956956
Z_EXPECTED_LAST
957957
} zend_expected_type;
958958

959-
ZEND_API ZEND_COLD int ZEND_FASTCALL zend_wrong_parameters_none_exception(void);
960-
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_count_exception(int min_num_args, int max_num_args);
961-
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_type_exception(int num, zend_expected_type expected_type, zval *arg);
962-
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_exception(int num, char *name, zval *arg);
963-
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, char *error);
959+
ZEND_API ZEND_COLD int ZEND_FASTCALL zend_wrong_parameters_none_error(void);
960+
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_count_error(int min_num_args, int max_num_args);
961+
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_type_error(int num, zend_expected_type expected_type, zval *arg);
962+
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_error(int num, char *name, zval *arg);
963+
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_error(int num, char *error);
964964

965965
#define ZPP_ERROR_OK 0
966966
#define ZPP_ERROR_FAILURE 1
@@ -994,7 +994,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
994994
(UNEXPECTED(_num_args > _max_num_args) && \
995995
EXPECTED(_max_num_args >= 0))) { \
996996
if (!(_flags & ZEND_PARSE_PARAMS_QUIET)) { \
997-
zend_wrong_parameters_count_exception(_min_num_args, _max_num_args); \
997+
zend_wrong_parameters_count_error(_min_num_args, _max_num_args); \
998998
} \
999999
_error_code = ZPP_ERROR_FAILURE; \
10001000
break; \
@@ -1007,7 +1007,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
10071007

10081008
#define ZEND_PARSE_PARAMETERS_NONE() do { \
10091009
if (UNEXPECTED(ZEND_NUM_ARGS() != 0)) { \
1010-
zend_wrong_parameters_none_exception(); \
1010+
zend_wrong_parameters_none_error(); \
10111011
return; \
10121012
} \
10131013
} while (0)
@@ -1017,11 +1017,11 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
10171017
if (UNEXPECTED(_error_code != ZPP_ERROR_OK)) { \
10181018
if (!(_flags & ZEND_PARSE_PARAMS_QUIET)) { \
10191019
if (_error_code == ZPP_ERROR_WRONG_CALLBACK) { \
1020-
zend_wrong_callback_exception(_i, _error); \
1020+
zend_wrong_callback_error(_i, _error); \
10211021
} else if (_error_code == ZPP_ERROR_WRONG_CLASS) { \
1022-
zend_wrong_parameter_class_exception(_i, _error, _arg); \
1022+
zend_wrong_parameter_class_error(_i, _error, _arg); \
10231023
} else if (_error_code == ZPP_ERROR_WRONG_ARG) { \
1024-
zend_wrong_parameter_type_exception(_i, _expected_type, _arg); \
1024+
zend_wrong_parameter_type_error(_i, _expected_type, _arg); \
10251025
} \
10261026
} \
10271027
failure; \

0 commit comments

Comments
 (0)