summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg.c
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2013-12-21 22:42:11 +0100
committerBob Weinand <bobwei9@hotmail.com>2013-12-24 00:30:37 +0100
commit0577ccad2876a763bcd48139b821fc2a193ea177 (patch)
tree513853de6ac80746c705844412882ee3c77a05f2 /sapi/phpdbg/phpdbg.c
parent617aefbcda56d9ef1fe8410f68bc057815bf5b08 (diff)
downloadphp-git-0577ccad2876a763bcd48139b821fc2a193ea177.tar.gz
Added breaking upon fatal-ish error
Diffstat (limited to 'sapi/phpdbg/phpdbg.c')
-rw-r--r--sapi/phpdbg/phpdbg.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
index 17193ed244..4b75ce26ca 100644
--- a/sapi/phpdbg/phpdbg.c
+++ b/sapi/phpdbg/phpdbg.c
@@ -438,6 +438,35 @@ static void php_sapi_phpdbg_log_message(char *message TSRMLS_DC) /* {{{ */
*/
if (phpdbg_booted) {
phpdbg_error("%s", message);
+
+ switch (PG(last_error_type)) {
+ case E_ERROR:
+ case E_CORE_ERROR:
+ case E_COMPILE_ERROR:
+ case E_USER_ERROR:
+ case E_PARSE:
+ case E_RECOVERABLE_ERROR:
+ if (!(PHPDBG_G(flags) & PHPDBG_IN_EVAL)) {
+ phpdbg_list_file(
+ zend_get_executed_filename(TSRMLS_C),
+ 3,
+ zend_get_executed_lineno(TSRMLS_C)-1,
+ zend_get_executed_lineno(TSRMLS_C)
+ TSRMLS_CC
+ );
+ }
+
+ do {
+ switch (phpdbg_interactive(TSRMLS_C)) {
+ case PHPDBG_LEAVE:
+ case PHPDBG_FINISH:
+ case PHPDBG_UNTIL:
+ case PHPDBG_NEXT:
+ return;
+ }
+ } while (!(PHPDBG_G(flags) & PHPDBG_IS_QUITTING));
+
+ }
} else fprintf(stdout, "%s\n", message);
}
/* }}} */