patch 8.2.3416: second error is reported while exception is being thrown
Problem: Second error is reported while exception is being thrown.
Solution: Do not check for trailing characters when already aborting.
(closes #8842)
diff --git a/src/userfunc.c b/src/userfunc.c
index e51df51..dc0a939 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -5012,7 +5012,7 @@
clear_evalarg(&evalarg, eap);
// When inside :try we need to check for following "| catch".
- if (!failed || eap->cstack->cs_trylevel > 0)
+ if (!aborting() && (!failed || eap->cstack->cs_trylevel > 0))
{
// Check for trailing illegal characters and a following command.
arg = skipwhite(arg);