]> granicus.if.org Git - php/commitdiff
display uncaught exceptions
authorkrakjoe <joe.watkins@live.co.uk>
Mon, 18 Nov 2013 11:51:41 +0000 (11:51 +0000)
committerkrakjoe <joe.watkins@live.co.uk>
Mon, 18 Nov 2013 11:51:41 +0000 (11:51 +0000)
phpdbg_prompt.c
test.php

index e5cd87f1ac849109ccbf909bc788a1ced2595edc..c365345a9cfef2a4f1c9ea927f7ad54b8ac616c7 100644 (file)
@@ -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!");
        }
index 45aeb816cbe1a3ca3e3987ba78b5bc0bbe984dc5..2266d157d5b8ffe66a875e003ad9643afa2bb701 100644 (file)
--- a/test.php
+++ b/test.php
@@ -1,5 +1,4 @@
 <?php
-
 if (isset($include))
        include (sprintf("%s/web-bootstrap.php", dirname(__FILE__)));