Karsten Hopp 07ed77
To: vim_dev@googlegroups.com
Karsten Hopp 07ed77
Subject: Patch 7.3.1312
Karsten Hopp 07ed77
Fcc: outbox
Karsten Hopp 07ed77
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 07ed77
Mime-Version: 1.0
Karsten Hopp 07ed77
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 07ed77
Content-Transfer-Encoding: 8bit
Karsten Hopp 07ed77
------------
Karsten Hopp 07ed77
Karsten Hopp 07ed77
Patch 7.3.1312 (after 7.3.1287)
Karsten Hopp 07ed77
Problem:    Not giving correct error messages for SystemExit().
Karsten Hopp 07ed77
Solution:   Move E858 into an else. (Ken Takata)
Karsten Hopp 07ed77
Files:	    src/if_py_both.h
Karsten Hopp 07ed77
Karsten Hopp 07ed77
Karsten Hopp 07ed77
*** ../vim-7.3.1311/src/if_py_both.h	2013-07-01 22:02:58.000000000 +0200
Karsten Hopp 07ed77
--- src/if_py_both.h	2013-07-06 12:57:36.000000000 +0200
Karsten Hopp 07ed77
***************
Karsten Hopp 07ed77
*** 5103,5116 ****
Karsten Hopp 07ed77
      run_ret = PyRun_String((char *)cmd, Py_eval_input, globals, globals);
Karsten Hopp 07ed77
      if (run_ret == NULL)
Karsten Hopp 07ed77
      {
Karsten Hopp 07ed77
! 	if (PyErr_ExceptionMatches(PyExc_SystemExit))
Karsten Hopp 07ed77
  	{
Karsten Hopp 07ed77
  	    EMSG2(_(e_py_systemexit), "python");
Karsten Hopp 07ed77
  	    PyErr_Clear();
Karsten Hopp 07ed77
  	}
Karsten Hopp 07ed77
! 	if (PyErr_Occurred() && !msg_silent)
Karsten Hopp 07ed77
! 	    PyErr_PrintEx(0);
Karsten Hopp 07ed77
! 	EMSG(_("E858: Eval did not return a valid python object"));
Karsten Hopp 07ed77
      }
Karsten Hopp 07ed77
      else
Karsten Hopp 07ed77
      {
Karsten Hopp 07ed77
--- 5103,5119 ----
Karsten Hopp 07ed77
      run_ret = PyRun_String((char *)cmd, Py_eval_input, globals, globals);
Karsten Hopp 07ed77
      if (run_ret == NULL)
Karsten Hopp 07ed77
      {
Karsten Hopp 07ed77
! 	if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_SystemExit))
Karsten Hopp 07ed77
  	{
Karsten Hopp 07ed77
  	    EMSG2(_(e_py_systemexit), "python");
Karsten Hopp 07ed77
  	    PyErr_Clear();
Karsten Hopp 07ed77
  	}
Karsten Hopp 07ed77
! 	else
Karsten Hopp 07ed77
! 	{
Karsten Hopp 07ed77
! 	    if (PyErr_Occurred() && !msg_silent)
Karsten Hopp 07ed77
! 		PyErr_PrintEx(0);
Karsten Hopp 07ed77
! 	    EMSG(_("E858: Eval did not return a valid python object"));
Karsten Hopp 07ed77
! 	}
Karsten Hopp 07ed77
      }
Karsten Hopp 07ed77
      else
Karsten Hopp 07ed77
      {
Karsten Hopp 07ed77
*** ../vim-7.3.1311/src/version.c	2013-07-05 20:09:08.000000000 +0200
Karsten Hopp 07ed77
--- src/version.c	2013-07-06 12:58:53.000000000 +0200
Karsten Hopp 07ed77
***************
Karsten Hopp 07ed77
*** 730,731 ****
Karsten Hopp 07ed77
--- 730,733 ----
Karsten Hopp 07ed77
  {   /* Add new patch number below this line */
Karsten Hopp 07ed77
+ /**/
Karsten Hopp 07ed77
+     1312,
Karsten Hopp 07ed77
  /**/
Karsten Hopp 07ed77
Karsten Hopp 07ed77
-- 
Karsten Hopp 07ed77
ROBIN:  (warily) And if you get a question wrong?
Karsten Hopp 07ed77
ARTHUR: You are cast into the Gorge of Eternal Peril.
Karsten Hopp 07ed77
ROBIN:  Oh ... wacho!
Karsten Hopp 07ed77
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
Karsten Hopp 07ed77
Karsten Hopp 07ed77
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 07ed77
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 07ed77
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 07ed77
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///