comparison src/if_py_both.h @ 16688:e791f29affae v8.1.1346

patch 8.1.1346: error for Python exception does not show useful info commit https://github.com/vim/vim/commit/7f3a28490abb7c495239fc438825e3d1aaafa76d Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 18 15:02:25 2019 +0200 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)
author Bram Moolenaar <Bram@vim.org>
date Sat, 18 May 2019 15:15:05 +0200
parents 7e733046db1d
children 9aa87f5aab55
comparison
equal deleted inserted replaced
16687:28e88bcb7681 16688:e791f29affae
410 if (!PyArg_Parse(string, "et#", ENC_OPT, &str, &len)) 410 if (!PyArg_Parse(string, "et#", ENC_OPT, &str, &len))
411 return -1; 411 return -1;
412 412
413 Py_BEGIN_ALLOW_THREADS 413 Py_BEGIN_ALLOW_THREADS
414 Python_Lock_Vim(); 414 Python_Lock_Vim();
415 if (error)
416 emsg_severe = TRUE;
415 writer((writefn)(error ? emsg : msg), (char_u *)str, len); 417 writer((writefn)(error ? emsg : msg), (char_u *)str, len);
416 Python_Release_Vim(); 418 Python_Release_Vim();
417 Py_END_ALLOW_THREADS 419 Py_END_ALLOW_THREADS
418 PyMem_Free(str); 420 PyMem_Free(str);
419 421