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_vm_execute.h | |
| parent | 261b4d0965bf0011c677c2ed431de77719a9cb46 (diff) | |
| download | php-git-32f9d0e180af2d809bf70e40850fc75e6d663945.tar.gz | |
- MFH Improve exception linking
Diffstat (limited to 'Zend/zend_vm_execute.h')
| -rw-r--r-- | Zend/zend_vm_execute.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index c7da5e3e0b..80151b35e5 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -1228,6 +1228,7 @@ static int ZEND_FASTCALL ZEND_CATCH_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_class_entry *ce; /* Check whether an exception has been thrown, if not, jump over code */ + zend_exception_restore(TSRMLS_C); if (EG(exception) == NULL) { ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->extended_value]); ZEND_VM_CONTINUE(); /* CHECK_ME */ @@ -1655,6 +1656,7 @@ static int ZEND_FASTCALL ZEND_THROW_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS if (Z_TYPE_P(value) != IS_OBJECT) { zend_error_noreturn(E_ERROR, "Can only throw objects"); } + zend_exception_save(TSRMLS_C); /* Not sure if a complete copy is what we want here */ ALLOC_ZVAL(exception); INIT_PZVAL_COPY(exception, value); @@ -1663,6 +1665,7 @@ static int ZEND_FASTCALL ZEND_THROW_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS } zend_throw_exception_object(exception TSRMLS_CC); + zend_exception_restore(TSRMLS_C); ZEND_VM_NEXT_OPCODE(); } @@ -4936,6 +4939,7 @@ static int ZEND_FASTCALL ZEND_THROW_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) if (Z_TYPE_P(value) != IS_OBJECT) { zend_error_noreturn(E_ERROR, "Can only throw objects"); } + zend_exception_save(TSRMLS_C); /* Not sure if a complete copy is what we want here */ ALLOC_ZVAL(exception); INIT_PZVAL_COPY(exception, value); @@ -4944,6 +4948,7 @@ static int ZEND_FASTCALL ZEND_THROW_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } zend_throw_exception_object(exception TSRMLS_CC); + zend_exception_restore(TSRMLS_C); ZEND_VM_NEXT_OPCODE(); } @@ -8121,6 +8126,7 @@ static int ZEND_FASTCALL ZEND_THROW_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) if (Z_TYPE_P(value) != IS_OBJECT) { zend_error_noreturn(E_ERROR, "Can only throw objects"); } + zend_exception_save(TSRMLS_C); /* Not sure if a complete copy is what we want here */ ALLOC_ZVAL(exception); INIT_PZVAL_COPY(exception, value); @@ -8129,6 +8135,7 @@ static int ZEND_FASTCALL ZEND_THROW_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } zend_throw_exception_object(exception TSRMLS_CC); + zend_exception_restore(TSRMLS_C); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } @@ -22193,6 +22200,7 @@ static int ZEND_FASTCALL ZEND_THROW_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) if (Z_TYPE_P(value) != IS_OBJECT) { zend_error_noreturn(E_ERROR, "Can only throw objects"); } + zend_exception_save(TSRMLS_C); /* Not sure if a complete copy is what we want here */ ALLOC_ZVAL(exception); INIT_PZVAL_COPY(exception, value); @@ -22201,6 +22209,7 @@ static int ZEND_FASTCALL ZEND_THROW_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } zend_throw_exception_object(exception TSRMLS_CC); + zend_exception_restore(TSRMLS_C); ZEND_VM_NEXT_OPCODE(); } |
