X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_api.c;h=a2a7f6ce71cfb0601392e46574e85dfdb74cc334;hp=372265a04052ce482568da9f8f44ff862b1a8b7e;hb=d22651c805eca6f0d508c6d5a47e8daac36841fe;hpb=5498a30670c7166d92df816e25f33467dd1033d0 diff --git a/http_api.c b/http_api.c index 372265a..a2a7f6c 100644 --- a/http_api.c +++ b/http_api.c @@ -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);