X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=http_functions.c;h=a22bea3d98219f597588cd0b73b2063fa50c4137;hb=bcda0df869eb6c34df1b3ec6888070c76bb33065;hp=82597f4517f4d22aa91d79d8426878065fdcdc3a;hpb=c5daa65dcad8fd0a916038c7567f610ea34c6315;p=m6w6%2Fext-http diff --git a/http_functions.c b/http_functions.c index 82597f4..a22bea3 100644 --- a/http_functions.c +++ b/http_functions.c @@ -1983,8 +1983,22 @@ PHP_FUNCTION(http_support) } /* }}} */ +#include "zend_exceptions.h" PHP_FUNCTION(http_test) { + int i; + + for (i = 0; i < 3; ++i) { + http_try { + fprintf(stderr, "Throwing Ex %d\n", i); + http_error_ex(HE_THROW, HTTP_E_RUNTIME, "Ex %d", i); + http_try { + fprintf(stderr, "Throwing SubEx %d\n", i); + http_error_ex(HE_THROW, HTTP_E_RUNTIME, "SubEx %d", i); + } http_catch(ZEND_EXCEPTION_GET_DEFAULT()); + } http_catch(ZEND_EXCEPTION_GET_DEFAULT()); + } + http_final(ZEND_EXCEPTION_GET_DEFAULT()); } /*