diff options
| author | Marcus Boerger <helly@php.net> | 2008-08-14 10:24:52 +0000 |
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2008-08-14 10:24:52 +0000 |
| commit | 32f9d0e180af2d809bf70e40850fc75e6d663945 (patch) | |
| tree | d5ad09ae92ff108bf761c268b543dc2a0235e4b2 /Zend/zend_execute_API.c | |
| parent | 261b4d0965bf0011c677c2ed431de77719a9cb46 (diff) | |
| download | php-git-32f9d0e180af2d809bf70e40850fc75e6d663945.tar.gz | |
- MFH Improve exception linking
Diffstat (limited to 'Zend/zend_execute_API.c')
| -rw-r--r-- | Zend/zend_execute_API.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 4b094e29a5..82c6619f0f 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -186,6 +186,7 @@ void init_executor(TSRMLS_D) /* {{{ */ #endif EG(exception) = NULL; + EG(prev_exception) = NULL; EG(scope) = NULL; EG(called_scope) = NULL; @@ -1029,7 +1030,7 @@ ZEND_API int zend_lookup_class_ex(const char *name, int name_length, int use_aut fcall_cache.object_pp = NULL; exception = EG(exception); - EG(exception) = NULL; + zend_exception_save(TSRMLS_C); retval = zend_call_function(&fcall_info, &fcall_cache TSRMLS_CC); EG(autoload_func) = fcall_cache.function_handler; @@ -1038,19 +1039,18 @@ ZEND_API int zend_lookup_class_ex(const char *name, int name_length, int use_aut zend_hash_del(EG(in_autoload), lc_name, name_length + 1); if (retval == FAILURE) { - EG(exception) = exception; + zend_exception_restore(TSRMLS_C); free_alloca(lc_free, use_heap); return FAILURE; } if (EG(exception) && exception) { + zend_exception_restore(TSRMLS_C); free_alloca(lc_free, use_heap); zend_error(E_ERROR, "Function %s(%s) threw an exception of type '%s'", ZEND_AUTOLOAD_FUNC_NAME, name, Z_OBJCE_P(EG(exception))->name); return FAILURE; } - if (!EG(exception)) { - EG(exception) = exception; - } + zend_exception_restore(TSRMLS_C); if (retval_ptr) { zval_ptr_dtor(&retval_ptr); } |
