- disallow detaching requests while executing progress callbacks
[m6w6/ext-http] / http_api.c
index 372265a04052ce482568da9f8f44ff862b1a8b7e..a2a7f6ce71cfb0601392e46574e85dfdb74cc334 100644 (file)
@@ -96,15 +96,15 @@ void _http_error_ex(long type TSRMLS_DC, long code, const char *format, ...)
        
        va_start(args, format);
 #ifdef ZEND_ENGINE_2
-               if ((type == E_THROW) || (PG(error_handling) == EH_THROW)) {
-                       char *message;
-                       zend_class_entry *ce = http_exception_get_for_code(code);
-                       
-                       http_try {
-                               vspprintf(&message, 0, format, args);
-                               zend_throw_exception(ce, message, code TSRMLS_CC);
-                               efree(message);
-                       } http_catch(ce);
+       if ((type == E_THROW) || (PG(error_handling) == EH_THROW)) {
+               char *message;
+               zend_class_entry *ce = http_exception_get_for_code(code);
+               
+               http_try {
+                       vspprintf(&message, 0, format, args);
+                       zend_throw_exception(ce, message, code TSRMLS_CC);
+                       efree(message);
+               } http_catch(PG(exception_class) ? PG(exception_class) : HTTP_EX_DEF_CE);
        } else
 #endif
        php_verror(NULL, "", type, format, args TSRMLS_CC);