diff src/vim9execute.c @ 25260:a60895011da9 v8.2.3166

patch 8.2.3166: Vim9: nested autoload call error overruled by "Unknown error" Commit: https://github.com/vim/vim/commit/b5841b99e678da187b68c21f46d56a608a0dc10c Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jul 15 18:09:53 2021 +0200 patch 8.2.3166: Vim9: nested autoload call error overruled by "Unknown error" Problem: Vim9: nested autoload call error overruled by "Unknown error". Solution: Check need_rethrow before giving an "Unknown error". (closes #8568)
author Bram Moolenaar <Bram@vim.org>
date Thu, 15 Jul 2021 18:15:04 +0200
parents fbb530e081ca
children 078edc1821bf
line wrap: on
line diff
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -4737,7 +4737,8 @@ failed_early:
     // Not sure if this is necessary.
     suppress_errthrow = save_suppress_errthrow;
 
-    if (ret != OK && did_emsg_cumul + did_emsg == did_emsg_before)
+    if (ret != OK && did_emsg_cumul + did_emsg == did_emsg_before
+							      && !need_rethrow)
 	semsg(_(e_unknown_error_while_executing_str),
 						   printable_func_name(ufunc));
     funcdepth_restore(orig_funcdepth);