3 * Handles odd errors in Steel programs
5 * 1.00 (24 September 1991)
7 * © 1991-1998 Straylight
10 /*----- Licensing note ----------------------------------------------------*
12 * This file is part of Straylight's Steel library.
14 * Steel is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2, or (at your option)
19 * Steel is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with Steel. If not, write to the Free Software Foundation,
26 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
48 * int exception_registerHandler(exception_handler env)
51 * Registers the current point as being a sensible place to go after an
52 * exception. This is implemented as a macro for the simple reason that
53 * things tend to go a tad wrong if you define your jmp_bufs in a function
57 * exception_handler env == an undefined variable of the type jmp_buf.
60 #ifndef exception_registerHandler
61 #define exception_registerHandler(exc) \
63 ( exc.sp=_dll_setjmp() ), \
64 ( exception__registerHandler((exc.j),setjmp(exc.j)) ? \
65 (_dll_longjmped(exc.sp),1) : \
72 * void exception_generate(char *message,...)
75 * Generates an ArmenLib exception, to be handled in an appropriate manner.
78 * char *message == printf()-type format string
81 void exception_generate(char *message,...);
85 * int exception__registerHandler(jmp_buf handler)
88 * This routine is for the use of exception segment only, and should not
89 * be called from your code.
92 int exception__registerHandler(jmp_buf handler,int result);