components/php-5_3/php-sapi/patches/028_php_Zend_zend_exceptions.c.patch
changeset 846 fe258446a1ae
equal deleted inserted replaced
845:f38158deaa77 846:fe258446a1ae
       
     1 --- php-5.3.10/Zend/zend_exceptions.c_orig	Sun Jan  1 05:15:04 2012
       
     2 +++ php-5.3.10/Zend/zend_exceptions.c	Wed Feb  8 11:25:25 2012
       
     3 @@ -27,6 +27,7 @@
       
     4  #include "zend_interfaces.h"
       
     5  #include "zend_exceptions.h"
       
     6  #include "zend_vm.h"
       
     7 +#include "zend_dtrace.h"
       
     8  
       
     9  zend_class_entry *default_exception_ce;
       
    10  zend_class_entry *error_exception_ce;
       
    11 @@ -82,6 +83,15 @@
       
    12  
       
    13  void zend_throw_exception_internal(zval *exception TSRMLS_DC) /* {{{ */
       
    14  {
       
    15 +#ifdef HAVE_DTRACE
       
    16 +       if (DTRACE_EXCEPTION_THROWN_ENABLED()) {
       
    17 +               char *classname;
       
    18 +               int name_len;
       
    19 +               zend_get_object_classname(exception, &classname, &name_len TSRMLS_CC);
       
    20 +               DTRACE_EXCEPTION_THROWN(classname);
       
    21 +       }
       
    22 +#endif /* HAVE_DTRACE */
       
    23 +
       
    24  	if (exception != NULL) {
       
    25  		zval *previous = EG(exception);
       
    26  		zend_exception_set_previous(exception, EG(exception) TSRMLS_CC);