display uncaught exceptions

This commit is contained in:
krakjoe 2013-11-18 11:51:41 +00:00
parent 5cc88ca88a
commit 57b67d71b0
2 changed files with 12 additions and 4 deletions

View file

@ -440,10 +440,19 @@ static PHPDBG_COMMAND(run) /* {{{ */
} }
} zend_end_try(); } zend_end_try();
EG(active_op_array) = orig_op_array; if (EG(exception)) {
EG(opline_ptr) = orig_opline; phpdbg_error("Uncaught Exception !");
EG(return_value_ptr_ptr) = orig_retval_ptr; /*
* @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 { } else {
phpdbg_error("Nothing to execute!"); phpdbg_error("Nothing to execute!");
} }

View file

@ -1,5 +1,4 @@
<?php <?php
if (isset($include)) if (isset($include))
include (sprintf("%s/web-bootstrap.php", dirname(__FILE__))); include (sprintf("%s/web-bootstrap.php", dirname(__FILE__)));