222
|
1 // error.h -*- C++ -*- |
|
2 /* |
|
3 |
1011
|
4 Copyright (C) 1992, 1993, 1994, 1995 John W. Eaton |
222
|
5 |
|
6 This file is part of Octave. |
|
7 |
|
8 Octave is free software; you can redistribute it and/or modify it |
|
9 under the terms of the GNU General Public License as published by the |
|
10 Free Software Foundation; either version 2, or (at your option) any |
|
11 later version. |
|
12 |
|
13 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
16 for more details. |
|
17 |
|
18 You should have received a copy of the GNU General Public License |
|
19 along with Octave; see the file COPYING. If not, write to the Free |
|
20 Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
|
21 |
|
22 */ |
|
23 |
382
|
24 #if !defined (octave_liboctave_error_h) |
|
25 #define octave_liboctave_error_h 1 |
|
26 |
|
27 extern "C++" { |
222
|
28 |
|
29 // Tell g++ that fatal doesn't return; |
|
30 |
|
31 #ifdef __GNUG__ |
|
32 typedef void v_fcn_cpc_x (const char *, ...); |
|
33 volatile v_fcn_cpc_x fatal; |
|
34 #endif |
|
35 |
227
|
36 extern void liboctave_fatal (const char *fmt, ...); |
|
37 |
222
|
38 typedef void (*liboctave_error_handler) (const char *, ...); |
|
39 |
227
|
40 // Would be nice to make this private, but we want to share it among |
|
41 // all the liboctave classes. |
|
42 extern liboctave_error_handler current_liboctave_error_handler; |
|
43 |
222
|
44 extern void set_liboctave_error_handler (liboctave_error_handler f); |
|
45 |
382
|
46 } // extern "C++" |
|
47 |
222
|
48 #endif |
|
49 |
|
50 /* |
|
51 ;;; Local Variables: *** |
|
52 ;;; mode: C++ *** |
|
53 ;;; page-delimiter: "^/\\*" *** |
|
54 ;;; End: *** |
|
55 */ |