14
14
#include " config.h"
15
15
#endif
16
16
17
- #include " php_v8_exception .h"
17
+ #include " php_v8_exception_manager .h"
18
18
#include " php_v8_stack_trace.h"
19
19
#include " php_v8_message.h"
20
20
#include " php_v8_string.h"
21
21
#include " php_v8_value.h"
22
22
#include " php_v8_isolate.h"
23
23
#include " php_v8.h"
24
24
25
- zend_class_entry *php_v8_exception_class_entry ;
26
- #define this_ce php_v8_exception_class_entry
25
+ zend_class_entry *php_v8_exception_manager_class_entry ;
26
+ #define this_ce php_v8_exception_manager_class_entry
27
27
28
28
29
- static PHP_METHOD (Exception, rangeError ) {
29
+ static PHP_METHOD (ExceptionManager, createRangeError ) {
30
30
zval *php_v8_message_zv;
31
31
zval *php_v8_context_zv;
32
32
@@ -49,7 +49,7 @@ static PHP_METHOD(Exception, rangeError) {
49
49
php_v8_create_value (return_value, local_value, php_v8_context->php_v8_isolate );
50
50
}
51
51
52
- static PHP_METHOD (Exception, referenceError ) {
52
+ static PHP_METHOD (ExceptionManager, createReferenceError ) {
53
53
zval *php_v8_message_zv;
54
54
zval *php_v8_context_zv;
55
55
@@ -72,7 +72,7 @@ static PHP_METHOD(Exception, referenceError) {
72
72
php_v8_create_value (return_value, local_value, php_v8_context->php_v8_isolate );
73
73
}
74
74
75
- static PHP_METHOD (Exception, syntaxError ) {
75
+ static PHP_METHOD (ExceptionManager, createSyntaxError ) {
76
76
zval *php_v8_message_zv;
77
77
zval *php_v8_context_zv;
78
78
@@ -95,7 +95,7 @@ static PHP_METHOD(Exception, syntaxError) {
95
95
php_v8_create_value (return_value, local_value, php_v8_context->php_v8_isolate );
96
96
}
97
97
98
- static PHP_METHOD (Exception, typeError ) {
98
+ static PHP_METHOD (ExceptionManager, createTypeError ) {
99
99
zval *php_v8_message_zv;
100
100
zval *php_v8_context_zv;
101
101
@@ -117,7 +117,7 @@ static PHP_METHOD(Exception, typeError) {
117
117
php_v8_create_value (return_value, local_value, php_v8_context->php_v8_isolate );
118
118
}
119
119
120
- static PHP_METHOD (Exception, error ) {
120
+ static PHP_METHOD (ExceptionManager, createError ) {
121
121
zval *php_v8_message_zv;
122
122
zval *php_v8_context_zv;
123
123
@@ -140,7 +140,7 @@ static PHP_METHOD(Exception, error) {
140
140
php_v8_create_value (return_value, local_value, php_v8_context->php_v8_isolate );
141
141
}
142
142
143
- static PHP_METHOD (Exception , createMessage) {
143
+ static PHP_METHOD (ExceptionManager , createMessage) {
144
144
zval *php_v8_context_zv;
145
145
zval *php_v8_exception_zv;
146
146
@@ -163,7 +163,7 @@ static PHP_METHOD(Exception, createMessage) {
163
163
php_v8_message_create_from_message (return_value, php_v8_context->php_v8_isolate , local_message);
164
164
}
165
165
166
- static PHP_METHOD (Exception , getStackTrace) {
166
+ static PHP_METHOD (ExceptionManager , getStackTrace) {
167
167
zval *php_v8_exception_zv;
168
168
zval *php_v8_context_zv;
169
169
@@ -191,27 +191,27 @@ static PHP_METHOD(Exception, getStackTrace) {
191
191
}
192
192
193
193
194
- PHP_V8_ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX (arginfo_rangeError , ZEND_RETURN_VALUE, 2 , V8\\ObjectValue, 0 )
194
+ PHP_V8_ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX (arginfo_createRangeError , ZEND_RETURN_VALUE, 2 , V8\\ObjectValue, 0 )
195
195
ZEND_ARG_OBJ_INFO(0 , context, V8\\Context, 0 )
196
196
ZEND_ARG_OBJ_INFO(0 , message, V8\\StringValue, 0 )
197
197
ZEND_END_ARG_INFO()
198
198
199
- PHP_V8_ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_referenceError , ZEND_RETURN_VALUE, 2 , V8\\ObjectValue, 0 )
199
+ PHP_V8_ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_createReferenceError , ZEND_RETURN_VALUE, 2 , V8\\ObjectValue, 0 )
200
200
ZEND_ARG_OBJ_INFO(0 , context, V8\\Context, 0 )
201
201
ZEND_ARG_OBJ_INFO(0 , message, V8\\StringValue, 0 )
202
202
ZEND_END_ARG_INFO()
203
203
204
- PHP_V8_ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_syntaxError , ZEND_RETURN_VALUE, 2 , V8\\ObjectValue, 0 )
204
+ PHP_V8_ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_createSyntaxError , ZEND_RETURN_VALUE, 2 , V8\\ObjectValue, 0 )
205
205
ZEND_ARG_OBJ_INFO(0 , context, V8\\Context, 0 )
206
206
ZEND_ARG_OBJ_INFO(0 , message, V8\\StringValue, 0 )
207
207
ZEND_END_ARG_INFO()
208
208
209
- PHP_V8_ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_typeError , ZEND_RETURN_VALUE, 2 , V8\\ObjectValue, 0 )
209
+ PHP_V8_ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_createTypeError , ZEND_RETURN_VALUE, 2 , V8\\ObjectValue, 0 )
210
210
ZEND_ARG_OBJ_INFO(0 , context, V8\\Context, 0 )
211
211
ZEND_ARG_OBJ_INFO(0 , message, V8\\StringValue, 0 )
212
212
ZEND_END_ARG_INFO()
213
213
214
- PHP_V8_ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_error , ZEND_RETURN_VALUE, 2 , V8\\ObjectValue, 0 )
214
+ PHP_V8_ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_createError , ZEND_RETURN_VALUE, 2 , V8\\ObjectValue, 0 )
215
215
ZEND_ARG_OBJ_INFO(0 , context, V8\\Context, 0 )
216
216
ZEND_ARG_OBJ_INFO(0 , message, V8\\StringValue, 0 )
217
217
ZEND_END_ARG_INFO()
@@ -226,22 +226,22 @@ PHP_V8_ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_getStackTrace, ZEND_RETURN
226
226
ZEND_ARG_OBJ_INFO(0 , exception , V8\\Value, 0 )
227
227
ZEND_END_ARG_INFO()
228
228
229
- static const zend_function_entry php_v8_exception_methods [] = {
230
- PHP_V8_ME (Exception, rangeError , ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
231
- PHP_V8_ME (Exception, referenceError , ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
232
- PHP_V8_ME (Exception, syntaxError , ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
233
- PHP_V8_ME (Exception, typeError , ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
234
- PHP_V8_ME (Exception, error , ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
235
- PHP_V8_ME (Exception , createMessage, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
236
- PHP_V8_ME (Exception , getStackTrace, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
229
+ static const zend_function_entry php_v8_exception_manger_methods [] = {
230
+ PHP_V8_ME (ExceptionManager, createRangeError , ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
231
+ PHP_V8_ME (ExceptionManager, createReferenceError , ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
232
+ PHP_V8_ME (ExceptionManager, createSyntaxError , ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
233
+ PHP_V8_ME (ExceptionManager, createTypeError , ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
234
+ PHP_V8_ME (ExceptionManager, createError , ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
235
+ PHP_V8_ME (ExceptionManager , createMessage, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
236
+ PHP_V8_ME (ExceptionManager , getStackTrace, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
237
237
238
238
PHP_FE_END
239
239
};
240
240
241
- PHP_MINIT_FUNCTION (php_v8_exception ) {
241
+ PHP_MINIT_FUNCTION (php_v8_exception_manger ) {
242
242
zend_class_entry ce;
243
- INIT_NS_CLASS_ENTRY (ce, PHP_V8_NS, " Exception " , php_v8_exception_methods );
244
- this_ce = zend_register_internal_class_ex (&ce, php_v8_value_class_entry );
243
+ INIT_NS_CLASS_ENTRY (ce, PHP_V8_NS, " ExceptionManager " , php_v8_exception_manger_methods );
244
+ this_ce = zend_register_internal_class (&ce);
245
245
246
246
return SUCCESS;
247
247
}
0 commit comments