patch 8.1.1346: error for Python exception does not show useful info
Problem: Error for Python exception does not show useful info.
Solution: Show the last line instead of the first one. (Ben Jackson,
closes #4381)
diff --git a/src/testdir/test_pyx2.vim b/src/testdir/test_pyx2.vim
index 50e57c3..baaf7fa 100644
--- a/src/testdir/test_pyx2.vim
+++ b/src/testdir/test_pyx2.vim
@@ -72,3 +72,11 @@
call assert_match(s:py3pattern, split(var)[0])
endif
endfunc
+
+func Test_Catch_Exception_Message()
+ try
+ pyx raise RuntimeError( 'TEST' )
+ catch /.*/
+ call assert_match( '^Vim(.*):RuntimeError: TEST$', v:exception )
+ endtry
+endfunc