Mercurial > octave
annotate liboctave/util/lo-error.h @ 25054:6652d3823428 stable
maint: Update copyright dates in all source files.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 30 Mar 2018 09:19:05 -0400 |
parents | 194eb4bd202b |
children | 00f796120a6d |
rev | line source |
---|---|
2551 | 1 /* |
2 | |
25054
6652d3823428
maint: Update copyright dates in all source files.
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
3 Copyright (C) 1996-2018 John W. Eaton |
2551 | 4 |
5 This file is part of Octave. | |
6 | |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23426
diff
changeset
|
7 Octave is free software: you can redistribute it and/or modify it |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22402
diff
changeset
|
8 under the terms of the GNU General Public License as published by |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23426
diff
changeset
|
9 the Free Software Foundation, either version 3 of the License, or |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22402
diff
changeset
|
10 (at your option) any later version. |
2551 | 11 |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22402
diff
changeset
|
12 Octave is distributed in the hope that it will be useful, but |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22402
diff
changeset
|
13 WITHOUT ANY WARRANTY; without even the implied warranty of |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22402
diff
changeset
|
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22402
diff
changeset
|
15 GNU General Public License for more details. |
2551 | 16 |
17 You should have received a copy of the GNU General Public License | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23426
diff
changeset
|
19 <https://www.gnu.org/licenses/>. |
2551 | 20 |
21 */ | |
22 | |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
23 #if ! defined (octave_lo_error_h) |
17822
ebb3ef964372
maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
24 #define octave_lo_error_h 1 |
2551 | 25 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21227
diff
changeset
|
26 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21227
diff
changeset
|
27 |
21724
aba2e6293dd8
use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
28 #if defined (__cplusplus) |
2551 | 29 extern "C" { |
30 #endif | |
31 | |
21227 | 32 OCTAVE_NORETURN extern void |
33 liboctave_fatal (const char *fmt, ...); | |
2551 | 34 |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21037
diff
changeset
|
35 OCTAVE_NORETURN extern |
21029
e3b3bb522d62
maint: Move GCC_ attributes to start of declaration for future compatibility.
Rik <rik@octave.org>
parents:
21016
diff
changeset
|
36 void liboctave_fatal_with_id (const char *id, const char *fmt, ...); |
10370
9c4daf174387
implement IDs for common liboctave exceptions
Jaroslav Hajek <highegg@gmail.com>
parents:
9933
diff
changeset
|
37 |
21227 | 38 extern void |
39 liboctave_warning (const char *fmt, ...); | |
3325 | 40 |
21227 | 41 extern void |
42 liboctave_warning_with_id (const char *id, const char *fmt, ...); | |
5781 | 43 |
21037
b4d6e7cd28db
maint: Avoid GCC_ATTR_RETURN in typedef which clang can't compile.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
44 typedef void (*liboctave_error_handler) (const char *, ...); |
2551 | 45 |
22402
4caa7b28d183
maint: Style check C++ code in liboctave/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
46 typedef void (*liboctave_error_with_id_handler) (const char *, const char *, |
4caa7b28d183
maint: Style check C++ code in liboctave/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
47 ...); |
10370
9c4daf174387
implement IDs for common liboctave exceptions
Jaroslav Hajek <highegg@gmail.com>
parents:
9933
diff
changeset
|
48 |
3325 | 49 typedef void (*liboctave_warning_handler) (const char *, ...); |
50 | |
22402
4caa7b28d183
maint: Style check C++ code in liboctave/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
51 typedef void (*liboctave_warning_with_id_handler) (const char *, const char *, |
4caa7b28d183
maint: Style check C++ code in liboctave/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
52 ...); |
5781 | 53 |
3325 | 54 /* Would be nice to make these pointers private, but we want to share |
55 them among all the liboctave classes. */ | |
22402
4caa7b28d183
maint: Style check C++ code in liboctave/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
56 OCTAVE_NORETURN OCTAVE_API extern liboctave_error_handler |
4caa7b28d183
maint: Style check C++ code in liboctave/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
57 current_liboctave_error_handler; |
2551 | 58 |
22402
4caa7b28d183
maint: Style check C++ code in liboctave/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
59 OCTAVE_NORETURN OCTAVE_API extern liboctave_error_with_id_handler |
4caa7b28d183
maint: Style check C++ code in liboctave/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
60 current_liboctave_error_with_id_handler; |
10370
9c4daf174387
implement IDs for common liboctave exceptions
Jaroslav Hajek <highegg@gmail.com>
parents:
9933
diff
changeset
|
61 |
21227 | 62 OCTAVE_API extern liboctave_warning_handler current_liboctave_warning_handler; |
3325 | 63 |
22402
4caa7b28d183
maint: Style check C++ code in liboctave/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
64 OCTAVE_API extern liboctave_warning_with_id_handler |
4caa7b28d183
maint: Style check C++ code in liboctave/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
65 current_liboctave_warning_with_id_handler; |
5781 | 66 |
21227 | 67 OCTAVE_API extern void |
68 set_liboctave_error_handler (OCTAVE_NORETURN liboctave_error_handler f); | |
2551 | 69 |
21227 | 70 OCTAVE_API extern void |
71 set_liboctave_error_with_id_handler (OCTAVE_NORETURN liboctave_error_with_id_handler f); | |
10370
9c4daf174387
implement IDs for common liboctave exceptions
Jaroslav Hajek <highegg@gmail.com>
parents:
9933
diff
changeset
|
72 |
21227 | 73 OCTAVE_API extern void |
74 set_liboctave_warning_handler (liboctave_warning_handler f); | |
3325 | 75 |
21227 | 76 OCTAVE_API extern void |
77 set_liboctave_warning_with_id_handler (liboctave_warning_with_id_handler f); | |
5781 | 78 |
21724
aba2e6293dd8
use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
79 #if defined (__cplusplus) |
2551 | 80 } |
81 #endif | |
82 | |
83 #endif |