comparison src/testdir/test_vim9_script.vim @ 27665:a6ffe874a24b v8.2.4358

patch 8.2.4358: Vim9: line number of exception is not set Commit: https://github.com/vim/vim/commit/90a57168a42048eb7e176a4f9acf607c31e8074f Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 12 14:23:17 2022 +0000 patch 8.2.4358: Vim9: line number of exception is not set Problem: Vim9: line number of exception is not set. Solution: Set the line number before throwing an exception. (closes https://github.com/vim/vim/issues/9755)
author Bram Moolenaar <Bram@vim.org>
date Sat, 12 Feb 2022 15:30:03 +0100
parents 9f70df0b2967
children 5c4ab8d4472c
comparison
equal deleted inserted replaced
27664:7ea1e3b0b5ca 27665:a6ffe874a24b
1055 def Test_try_catch_skipped() 1055 def Test_try_catch_skipped()
1056 var instr = execute('disassemble Try_catch_skipped') 1056 var instr = execute('disassemble Try_catch_skipped')
1057 assert_match("NEWLIST size 0\n", instr) 1057 assert_match("NEWLIST size 0\n", instr)
1058 enddef 1058 enddef
1059 1059
1060 def Test_throw_line_number()
1061 def Func()
1062 eval 1 + 1
1063 eval 2 + 2
1064 throw 'exception'
1065 enddef
1066 try
1067 Func()
1068 catch /exception/
1069 assert_match('line 3', v:throwpoint)
1070 endtry
1071 enddef
1060 1072
1061 1073
1062 def Test_throw_vimscript() 1074 def Test_throw_vimscript()
1063 # only checks line continuation 1075 # only checks line continuation
1064 var lines =<< trim END 1076 var lines =<< trim END