From: krakjoe Date: Mon, 18 Nov 2013 11:51:41 +0000 (+0000) Subject: display uncaught exceptions X-Git-Tag: php-5.6.0alpha1~110^2~242 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=57b67d71b0264143ba33d997eff918d34e8adc67;p=php display uncaught exceptions --- diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index e5cd87f1ac..c365345a9c 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -440,10 +440,19 @@ static PHPDBG_COMMAND(run) /* {{{ */ } } zend_end_try(); - EG(active_op_array) = orig_op_array; - EG(opline_ptr) = orig_opline; - EG(return_value_ptr_ptr) = orig_retval_ptr; + if (EG(exception)) { + phpdbg_error("Uncaught Exception !"); + /* + * @TODO(anyone) something better !! + */ + zend_print_zval_r( + EG(exception), 0 TSRMLS_CC); + } + EG(active_op_array) = orig_op_array; + EG(opline_ptr) = orig_opline; + EG(return_value_ptr_ptr) = orig_retval_ptr; + } else { phpdbg_error("Nothing to execute!"); } diff --git a/test.php b/test.php index 45aeb816cb..2266d157d5 100644 --- a/test.php +++ b/test.php @@ -1,5 +1,4 @@