@@ -80,22 +80,18 @@ PHP_METHOD(BulkWrite, __construct)
80
80
PHP_METHOD (BulkWrite , insert )
81
81
{
82
82
php_phongo_bulkwrite_t * intern ;
83
- zend_error_handling error_handling ;
84
83
zval * document ;
85
84
bson_t * bson ;
86
85
bson_t * bson_out = NULL ;
87
86
int bson_flags = PHONGO_BSON_ADD_ID ;
88
87
(void )return_value_ptr ; (void )return_value_used ;
89
88
90
89
91
- zend_replace_error_handling (EH_THROW , phongo_exception_from_phongo_domain (PHONGO_ERROR_INVALID_ARGUMENT ), & error_handling TSRMLS_CC );
92
90
intern = (php_phongo_bulkwrite_t * )zend_object_store_get_object (getThis () TSRMLS_CC );
93
91
94
92
if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "A" , & document ) == FAILURE ) {
95
- zend_restore_error_handling (& error_handling TSRMLS_CC );
96
93
return ;
97
94
}
98
- zend_restore_error_handling (& error_handling TSRMLS_CC );
99
95
100
96
101
97
if (return_value_used ) {
@@ -125,7 +121,6 @@ PHP_METHOD(BulkWrite, insert)
125
121
PHP_METHOD (BulkWrite , update )
126
122
{
127
123
php_phongo_bulkwrite_t * intern ;
128
- zend_error_handling error_handling ;
129
124
zval * query ;
130
125
zval * newObj ;
131
126
zval * updateOptions = NULL ;
@@ -136,14 +131,11 @@ PHP_METHOD(BulkWrite, update)
136
131
(void )return_value_ptr ; (void )return_value ; (void )return_value_used ;
137
132
138
133
139
- zend_replace_error_handling (EH_THROW , phongo_exception_from_phongo_domain (PHONGO_ERROR_INVALID_ARGUMENT ), & error_handling TSRMLS_CC );
140
134
intern = (php_phongo_bulkwrite_t * )zend_object_store_get_object (getThis () TSRMLS_CC );
141
135
142
136
if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "AA|a!" , & query , & newObj , & updateOptions ) == FAILURE ) {
143
- zend_restore_error_handling (& error_handling TSRMLS_CC );
144
137
return ;
145
138
}
146
- zend_restore_error_handling (& error_handling TSRMLS_CC );
147
139
148
140
149
141
bquery = bson_new ();
@@ -187,21 +179,17 @@ PHP_METHOD(BulkWrite, update)
187
179
PHP_METHOD (BulkWrite , delete )
188
180
{
189
181
php_phongo_bulkwrite_t * intern ;
190
- zend_error_handling error_handling ;
191
182
zval * query ;
192
183
zval * deleteOptions = NULL ;
193
184
bson_t * bson ;
194
185
(void )return_value_ptr ; (void )return_value ; (void )return_value_used ;
195
186
196
187
197
- zend_replace_error_handling (EH_THROW , phongo_exception_from_phongo_domain (PHONGO_ERROR_INVALID_ARGUMENT ), & error_handling TSRMLS_CC );
198
188
intern = (php_phongo_bulkwrite_t * )zend_object_store_get_object (getThis () TSRMLS_CC );
199
189
200
190
if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "A|a!" , & query , & deleteOptions ) == FAILURE ) {
201
- zend_restore_error_handling (& error_handling TSRMLS_CC );
202
191
return ;
203
192
}
204
- zend_restore_error_handling (& error_handling TSRMLS_CC );
205
193
206
194
207
195
bson = bson_new ();
@@ -221,18 +209,14 @@ PHP_METHOD(BulkWrite, delete)
221
209
PHP_METHOD (BulkWrite , count )
222
210
{
223
211
php_phongo_bulkwrite_t * intern ;
224
- zend_error_handling error_handling ;
225
212
(void )return_value_ptr ; (void )return_value ; (void )return_value_used ;
226
213
227
214
228
- zend_replace_error_handling (EH_THROW , phongo_exception_from_phongo_domain (PHONGO_ERROR_INVALID_ARGUMENT ), & error_handling TSRMLS_CC );
229
215
intern = (php_phongo_bulkwrite_t * )zend_object_store_get_object (getThis () TSRMLS_CC );
230
216
231
217
if (zend_parse_parameters_none () == FAILURE ) {
232
- zend_restore_error_handling (& error_handling TSRMLS_CC );
233
218
return ;
234
219
}
235
- zend_restore_error_handling (& error_handling TSRMLS_CC );
236
220
237
221
RETURN_LONG (intern -> bulk -> commands .len );
238
222
}
0 commit comments