[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: method to reset C++ error_state variable from m-file?
From: |
Olaf Till |
Subject: |
Re: method to reset C++ error_state variable from m-file? |
Date: |
Sat, 24 Oct 2015 09:27:12 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Fri, Oct 23, 2015 at 03:22:47PM -0700, Rik wrote:
> On 10/23/2015 01:53 PM, John W. Eaton wrote:
> ...
> > Maybe this is an error in the implementation of unwind_protect? Should
> > the error state be unset, similar to try-catch? If it is set when the
> > cleanup block is entered, should it be reset once the cleanup block is
> > finished?
>
> It seems like the error state should be cleared, temporarily, so that the
> unwind_protect_cleanup block can actually complete the cleanup. And
> finally when reaching the end_unwind_protect it should be restored to
> whatever value it originally had.
That's what the previous code (stable branch) seemingly already did in
tree_evaluator::do_unwind_protect_cleanup_code(), seems the new code
(development branch) just forgot to care for the still existing
error_state variable ...
Olaf
--
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net
signature.asc
Description: Digital signature