diff options
author | Marcus Boerger <helly@php.net> | 2008-08-08 17:47:31 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2008-08-08 17:47:31 +0000 |
commit | 3f7a4b7e90eee47e7b6873f800e93854b0338dd4 (patch) | |
tree | a36ccc107e52711aa644eb9197fc3c7beb346deb /main | |
parent | 6fb114f1d5a6013ef7cde20e296a228ead10aabd (diff) | |
download | php-git-3f7a4b7e90eee47e7b6873f800e93854b0338dd4.tar.gz |
- MFH error handling, now with save, replace, restore
Diffstat (limited to 'main')
-rw-r--r-- | main/main.c | 15 | ||||
-rw-r--r-- | main/php.h | 5 |
2 files changed, 4 insertions, 16 deletions
diff --git a/main/main.c b/main/main.c index d1e56b76da..3662e90687 100644 --- a/main/main.c +++ b/main/main.c @@ -777,21 +777,6 @@ PHPAPI void php_html_puts(const char *str, uint size TSRMLS_DC) } /* }}} */ -/* {{{ php_suppress_errors */ -PHPAPI void php_set_error_handling(error_handling_t error_handling, zend_class_entry *exception_class TSRMLS_DC) -{ - EG(error_handling) = error_handling; - EG(exception_class) = exception_class; - - if (error_handling == EH_NORMAL) { - EG(user_error_handler) = EG(user_error_handler_old); - } else { - EG(user_error_handler_old) = EG(user_error_handler); - EG(user_error_handler) = NULL; - } -} -/* }}} */ - /* {{{ php_error_cb extended error handling function */ static void php_error_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args) diff --git a/main/php.h b/main/php.h index ca20596797..88a94da5c9 100644 --- a/main/php.h +++ b/main/php.h @@ -287,7 +287,10 @@ END_EXTERN_C() #define error_handling_t zend_error_handling_t BEGIN_EXTERN_C() -PHPAPI void php_set_error_handling(error_handling_t error_handling, zend_class_entry *exception_class TSRMLS_DC); +static inline ZEND_ATTRIBUTE_DEPRECATED void php_set_error_handling(error_handling_t error_handling, zend_class_entry *exception_class TSRMLS_DC) +{ + zend_replace_error_handling(error_handling, exception_class, NULL TSRMLS_CC); +} static inline ZEND_ATTRIBUTE_DEPRECATED void php_std_error_handling() {} PHPAPI void php_verror(const char *docref, const char *params, int type, const char *format, va_list args TSRMLS_DC) PHP_ATTRIBUTE_FORMAT(printf, 4, 0); |