1
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 John W. Eaton |
1
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
1315
|
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
1
|
20 |
|
21 */ |
|
22 |
383
|
23 #if !defined (octave_error_h) |
|
24 #define octave_error_h 1 |
1
|
25 |
3935
|
26 #include <string> |
1489
|
27 |
1
|
28 #define panic_impossible() \ |
|
29 panic ("impossible state reached in file `%s' at line %d", \ |
|
30 __FILE__, __LINE__) |
|
31 |
4318
|
32 extern void reset_error_handler (void); |
|
33 |
1
|
34 extern void message (const char *name, const char *fmt, ...); |
|
35 extern void usage (const char *fmt, ...); |
|
36 extern void warning (const char *fmt, ...); |
|
37 extern void error (const char *fmt, ...); |
1005
|
38 extern void parse_error (const char *fmt, ...); |
2440
|
39 extern void panic (const char *fmt, ...) GCC_ATTR_NORETURN; |
1
|
40 |
143
|
41 // Current error state. |
|
42 extern int error_state; |
|
43 |
3489
|
44 // Current warning state. |
|
45 extern int warning_state; |
|
46 |
1489
|
47 // Tell the error handler whether to print messages, or just store |
|
48 // them for later. Used for handling errors in eval() and |
|
49 // the `unwind_protect' statement. |
4699
|
50 extern int buffer_error_messages; |
1489
|
51 |
3815
|
52 // TRUE means error messages are turned off. |
|
53 extern bool discard_error_messages; |
|
54 |
4452
|
55 // TRUE means warning messages are turned off. |
|
56 extern bool discard_warning_messages; |
|
57 |
3935
|
58 // The current warning state. Valid values are "on", "off", |
|
59 // "backtrace", or "debug". |
|
60 extern std::string Vwarning_option; |
|
61 |
1
|
62 #endif |
|
63 |
|
64 /* |
|
65 ;;; Local Variables: *** |
|
66 ;;; mode: C++ *** |
|
67 ;;; End: *** |
|
68 */ |