summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.1346
blob: 4e01e27c605de162cb5509bb838b0c313135ca70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
To: vim_dev@googlegroups.com
Subject: Patch 8.1.1346
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.1346
Problem:    Error for Python exception does not show useful info.
Solution:   Show the last line instead of the first one. (Ben Jackson,
            closes #4381)
Files:	    src/if_py_both.h, src/testdir/test86.ok, src/testdir/test87.ok,
            src/testdir/test_python2.vim, src/testdir/test_python3.vim,
            src/testdir/test_pyx2.vim, src/testdir/test_pyx3.vim

*** ../vim-8.1.1345/src/if_py_both.h	2019-05-09 15:12:45.172723940 +0200
--- src/if_py_both.h	2019-05-18 14:53:57.777848902 +0200
***************
*** 412,417 ****
--- 412,419 ----
  
      Py_BEGIN_ALLOW_THREADS
      Python_Lock_Vim();
+     if (error)
+ 	emsg_severe = TRUE;
      writer((writefn)(error ? emsg : msg), (char_u *)str, len);
      Python_Release_Vim();
      Py_END_ALLOW_THREADS
*** ../vim-8.1.1345/src/testdir/test86.ok	2018-08-07 19:45:22.619218432 +0200
--- src/testdir/test86.ok	2019-05-18 14:42:55.261468186 +0200
***************
*** 91,97 ****
  0.0
  "\0":	Vim(let):E859:
  {"\0": 1}:	Vim(let):E859:
! undefined_name:	Vim(let):Trace
  vim:	Vim(let):E859:
  [1]
  [1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 1]
--- 91,97 ----
  0.0
  "\0":	Vim(let):E859:
  {"\0": 1}:	Vim(let):E859:
! undefined_name:	Vim(let):NameE
  vim:	Vim(let):E859:
  [1]
  [1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 1]
*** ../vim-8.1.1345/src/testdir/test87.ok	2018-08-07 19:45:22.623218411 +0200
--- src/testdir/test87.ok	2019-05-18 14:42:55.261468186 +0200
***************
*** 91,97 ****
  0.0
  "\0":	Vim(let):E859:
  {"\0": 1}:	Vim(let):E859:
! undefined_name:	Vim(let):Trace
  vim:	Vim(let):E859:
  [1]
  [1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 1]
--- 91,97 ----
  0.0
  "\0":	Vim(let):E859:
  {"\0": 1}:	Vim(let):E859:
! undefined_name:	Vim(let):NameE
  vim:	Vim(let):E859:
  [1]
  [1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 1]
*** ../vim-8.1.1345/src/testdir/test_python2.vim	2019-03-30 12:33:07.845473937 +0100
--- src/testdir/test_python2.vim	2019-05-18 14:42:55.261468186 +0200
***************
*** 160,162 ****
--- 160,170 ----
  
    bwipe!
  endfunction
+ 
+ func Test_Catch_Exception_Message()
+   try
+     py raise RuntimeError( 'TEST' )
+   catch /.*/
+     call assert_match( '^Vim(.*):RuntimeError: TEST$', v:exception )
+   endtry
+ endfunc
*** ../vim-8.1.1345/src/testdir/test_python3.vim	2019-03-30 12:33:07.845473937 +0100
--- src/testdir/test_python3.vim	2019-05-18 14:42:55.261468186 +0200
***************
*** 160,162 ****
--- 160,170 ----
  
    bwipe!
  endfunction
+ 
+ func Test_Catch_Exception_Message()
+   try
+     py3 raise RuntimeError( 'TEST' )
+   catch /.*/
+     call assert_match( '^Vim(.*):RuntimeError: TEST$', v:exception )
+   endtry
+ endfunc
*** ../vim-8.1.1345/src/testdir/test_pyx2.vim	2017-01-28 15:36:57.000000000 +0100
--- src/testdir/test_pyx2.vim	2019-05-18 14:42:55.261468186 +0200
***************
*** 72,74 ****
--- 72,82 ----
      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
*** ../vim-8.1.1345/src/testdir/test_pyx3.vim	2017-01-28 15:36:41.000000000 +0100
--- src/testdir/test_pyx3.vim	2019-05-18 14:42:55.261468186 +0200
***************
*** 72,74 ****
--- 72,82 ----
      call assert_match(s:py2pattern, 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
*** ../vim-8.1.1345/src/version.c	2019-05-18 13:41:19.061511348 +0200
--- src/version.c	2019-05-18 14:44:49.988846112 +0200
***************
*** 769,770 ****
--- 769,772 ----
  {   /* Add new patch number below this line */
+ /**/
+     1346,
  /**/

-- 
You can test a person's importance in the organization by asking how much RAM
his computer has.  Anybody who knows the answer to that question is not a
decision-maker.
				(Scott Adams - The Dilbert principle)

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///