1
|
1 // error.h -*- C++ -*- |
|
2 /* |
|
3 |
1884
|
4 Copyright (C) 1996 John W. Eaton |
1
|
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 |
1315
|
20 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
1
|
21 |
|
22 */ |
|
23 |
383
|
24 #if !defined (octave_error_h) |
|
25 #define octave_error_h 1 |
1
|
26 |
1489
|
27 class ostrstream; |
|
28 |
1
|
29 #define panic_impossible() \ |
|
30 panic ("impossible state reached in file `%s' at line %d", \ |
|
31 __FILE__, __LINE__) |
|
32 |
|
33 extern void message (const char *name, const char *fmt, ...); |
|
34 extern void usage (const char *fmt, ...); |
|
35 extern void warning (const char *fmt, ...); |
|
36 extern void error (const char *fmt, ...); |
1005
|
37 extern void parse_error (const char *fmt, ...); |
1426
|
38 extern void panic (const char *fmt, ...) NORETURN; |
1
|
39 |
143
|
40 // Current error state. |
|
41 extern int error_state; |
|
42 |
1489
|
43 // Tell the error handler whether to print messages, or just store |
|
44 // them for later. Used for handling errors in eval() and |
|
45 // the `unwind_protect' statement. |
|
46 extern int buffer_error_messages; |
|
47 |
|
48 // The message buffer |
|
49 extern ostrstream *error_message_buffer; |
672
|
50 |
1
|
51 #endif |
|
52 |
|
53 /* |
|
54 ;;; Local Variables: *** |
|
55 ;;; mode: C++ *** |
|
56 ;;; page-delimiter: "^/\\*" *** |
|
57 ;;; End: *** |
|
58 */ |