comparison src/eval.c @ 5348:39304a35b6b3

Don't commit suicide when an X device dies. 2011-01-30 Michael Sperber <mike@xemacs.org> * redisplay.h: * redisplay.c: (redisplay_cancel_ritual_suicide): * eval.c (throw_or_bomb_out_unsafe): * device-x.c (x_IO_error_handler): Don't commit suicide when an X device dies.
author Mike Sperber <sperber@deinprogramm.de>
date Sun, 30 Jan 2011 12:20:19 +0100
parents c096d8051f89
children 0af042a0c116
comparison
equal deleted inserted replaced
5347:fd441b85d760 5348:39304a35b6b3
1800 throw_level = 0; 1800 throw_level = 0;
1801 #endif 1801 #endif
1802 LONGJMP (c->jmp, 1); 1802 LONGJMP (c->jmp, 1);
1803 } 1803 }
1804 1804
1805 DECLARE_DOESNT_RETURN (throw_or_bomb_out (Lisp_Object, Lisp_Object, int, 1805 DECLARE_DOESNT_RETURN (throw_or_bomb_out_unsafe (Lisp_Object, Lisp_Object, int,
1806 Lisp_Object, Lisp_Object)); 1806 Lisp_Object, Lisp_Object));
1807 1807
1808 DOESNT_RETURN 1808 DOESNT_RETURN
1809 throw_or_bomb_out (Lisp_Object tag, Lisp_Object val, int bomb_out_p, 1809 throw_or_bomb_out_unsafe (Lisp_Object tag, Lisp_Object val, int bomb_out_p,
1810 Lisp_Object sig, Lisp_Object data) 1810 Lisp_Object sig, Lisp_Object data)
1811 { 1811 {
1812 #ifdef DEFEND_AGAINST_THROW_RECURSION
1813 /* die if we recurse more than is reasonable */
1814 assert (++throw_level <= 20);
1815 #endif
1816
1817 #ifdef ERROR_CHECK_TRAPPING_PROBLEMS
1818 check_proper_critical_section_nonlocal_exit_protection ();
1819 #endif
1820
1821 /* If bomb_out_p is t, this is being called from Fsignal as a 1812 /* If bomb_out_p is t, this is being called from Fsignal as a
1822 "last resort" when there is no handler for this error and 1813 "last resort" when there is no handler for this error and
1823 the debugger couldn't be invoked, so we are throwing to 1814 the debugger couldn't be invoked, so we are throwing to
1824 `top-level'. If this tag doesn't exist (happens during the 1815 `top-level'. If this tag doesn't exist (happens during the
1825 initialization stages) we would get in an infinite recursive 1816 initialization stages) we would get in an infinite recursive
1854 if (!bomb_out_p) 1845 if (!bomb_out_p)
1855 tag = Fsignal (Qno_catch, list2 (tag, val)); 1846 tag = Fsignal (Qno_catch, list2 (tag, val));
1856 else 1847 else
1857 call1 (Qreally_early_error_handler, Fcons (sig, data)); 1848 call1 (Qreally_early_error_handler, Fcons (sig, data));
1858 } 1849 }
1850 }
1851
1852 DECLARE_DOESNT_RETURN (throw_or_bomb_out (Lisp_Object, Lisp_Object, int,
1853 Lisp_Object, Lisp_Object));
1854
1855 DOESNT_RETURN
1856 throw_or_bomb_out (Lisp_Object tag, Lisp_Object val, int bomb_out_p,
1857 Lisp_Object sig, Lisp_Object data)
1858 {
1859 #ifdef DEFEND_AGAINST_THROW_RECURSION
1860 /* die if we recurse more than is reasonable */
1861 assert (++throw_level <= 20);
1862 #endif
1863
1864 #ifdef ERROR_CHECK_TRAPPING_PROBLEMS
1865 check_proper_critical_section_nonlocal_exit_protection ();
1866 #endif
1867 throw_or_bomb_out_unsafe (tag, val, bomb_out_p, sig, data);
1859 } 1868 }
1860 1869
1861 /* See above, where CATCHLIST is defined, for a description of how 1870 /* See above, where CATCHLIST is defined, for a description of how
1862 Fthrow() works. 1871 Fthrow() works.
1863 1872