0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 9.0.2059: outstanding exceptions may be skipped

Problem:  outstanding exceptions may be skipped
Solution: When restoring exception state, process remaining outstanding
          exceptions

closes: #13386

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
Yegappan Lakshmanan
2023-10-21 11:59:42 +02:00
committed by Christian Brabandt
parent a36acb7ac4
commit 0ab500dede
9 changed files with 173 additions and 18 deletions

View File

@@ -757,6 +757,7 @@ exception_state_save(exception_state_T *estate)
estate->estate_did_throw = did_throw;
estate->estate_need_rethrow = need_rethrow;
estate->estate_trylevel = trylevel;
estate->estate_did_emsg = did_emsg;
}
/*
@@ -765,11 +766,14 @@ exception_state_save(exception_state_T *estate)
void
exception_state_restore(exception_state_T *estate)
{
if (current_exception == NULL)
current_exception = estate->estate_current_exception;
did_throw |= estate->estate_did_throw;
need_rethrow |= estate->estate_need_rethrow;
trylevel |= estate->estate_trylevel;
// Handle any outstanding exceptions before restoring the state
if (did_throw)
handle_did_throw();
current_exception = estate->estate_current_exception;
did_throw = estate->estate_did_throw;
need_rethrow = estate->estate_need_rethrow;
trylevel = estate->estate_trylevel;
did_emsg = estate->estate_did_emsg;
}
/*
@@ -782,6 +786,7 @@ exception_state_clear(void)
did_throw = FALSE;
need_rethrow = FALSE;
trylevel = 0;
did_emsg = 0;
}
/*