[xdebug-dev] xdebug xdebug/xdebug.c - Implemented break points for different types of PHP errors. You can now set

From: Derick Rethans <derick[@]derickrethans.nl>
Date: Sat, 19 Aug 2006 14:18:31 +0200

Date: Sat Aug 19 14:18:31 CEST 2006
User: Derick Rethans
Directory: xdebug

Log Message:
[0.50]
- Implemented break points for different types of PHP errors. You can now set
  an 'exception' breakpoint on "Fatal error", "Warning", "Notice" etc. This is
  related to bug #187.

Modified files:
           xdebug/xdebug.c (version: 1.326)

[FILE: /xdebug/xdebug.c]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.325
retrieving revision 1.326
diff -u -r1.325 -r1.326
--- xdebug/xdebug.c:1.325 Mon Aug 14 07:31:54 2006 GMT
+++ xdebug/xdebug.c Sat Aug 19 10:18:31 2006 GMT
@@ -1888,6 +1888,7 @@
 {
         char *buffer, *error_type_str;
         int buffer_len;
+ xdebug_brk_info *extra_brk_info = NULL;
 
         TSRMLS_FETCH();
 
@@ -1932,6 +1933,17 @@
                 print_stack(!(strcmp("cli", sapi_module.name) == 0), error_type_str, buffer, error_filename, error_lineno, !PG(display_errors) TSRMLS_CC);
         }
 
+ /* Check for the pseudo exceptions to allow breakpoints on PHP error statusses */
+ if (XG(remote_enabled)) {
+ if (xdebug_hash_find(XG(context).exception_breakpoints, error_type_str, strlen(error_type_str), (void *) &extra_brk_info)) {
+ if (handle_hit_value(extra_brk_info)) {
+ if (!XG(context).handler->remote_error(&(XG(context)), 0, error_type_str, buffer, error_filename, error_lineno, XG(stack))) {
+ XG(remote_enabled) = 0;
+ }
+ }
+ }
+ }
+
         /* Log to logger */
         if (PG(log_errors) && !(strcmp("cli", sapi_module.name) == 0) && (EG(error_reporting) & type)) {
                 char log_buffer[1024];
Received on Sat Aug 19 2006 - 14:27:59 BST

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST