summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/testdir/test_vim9_script.vim20
-rw-r--r--src/version.c2
-rw-r--r--src/vim9execute.c6
3 files changed, 21 insertions, 7 deletions
diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim
index bc1f87377..76ce2e549 100644
--- a/src/testdir/test_vim9_script.vim
+++ b/src/testdir/test_vim9_script.vim
@@ -466,6 +466,20 @@ def Test_try_catch_fails()
call CheckDefFailure(['throw xxx'], 'E1001:')
enddef
+let someJob = test_null_job()
+
+def FuncWithError()
+ echomsg g:someJob
+enddef
+
+func Test_convert_emsg_to_exception()
+ try
+ call FuncWithError()
+ catch
+ call assert_match('Vim:E908:', v:exception)
+ endtry
+endfunc
+
let s:export_script_lines =<< trim END
vim9script
let name: string = 'bob'
@@ -1058,7 +1072,11 @@ def Test_echomsg_cmd()
enddef
def Test_echoerr_cmd()
- # TODO: write this test
+ try
+ echoerr 'something' 'wrong' # comment
+ catch
+ assert_match('something wrong', v:exception)
+ endtry
enddef
def Test_for_outside_of_function()
diff --git a/src/version.c b/src/version.c
index 61681882b..4c743cbfa 100644
--- a/src/version.c
+++ b/src/version.c
@@ -747,6 +747,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 700,
+/**/
699,
/**/
698,
diff --git a/src/vim9execute.c b/src/vim9execute.c
index 27ad04b44..5915ea1dc 100644
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -898,14 +898,8 @@ call_def_function(
}
else
{
- int save_did_emsg = did_emsg;
-
SOURCING_LNUM = iptr->isn_lnum;
emsg(ga.ga_data);
- if (!force_abort)
- // We don't want to abort following
- // commands, restore did_emsg.
- did_emsg = save_did_emsg;
}
}
}