aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ex_docmd.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index a6246afb41..f66464fa3a 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -972,8 +972,13 @@ void handle_did_throw(void)
current_exception->throw_name = NULL;
discard_current_exception(); // uses IObuff if 'verbose'
- suppress_errthrow = true;
- force_abort = true;
+
+ // If "silent!" is active the uncaught exception is not fatal.
+ if (emsg_silent == 0) {
+ suppress_errthrow = true;
+ force_abort = true;
+ }
+
msg_ext_set_kind("emsg"); // kind=emsg for :throw, exceptions. #9993
if (messages != NULL) {