Automatic date update in version.in
[binutils-gdb.git] / gdbsupport / errors.cc
blob703b2213756fa12710cbc43b336a4a6932917811
1 /* Error reporting facilities.
3 Copyright (C) 1986-2022 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 #include "common-defs.h"
21 #include "errors.h"
23 /* See gdbsupport/errors.h. */
25 void
26 warning (const char *fmt, ...)
28 va_list ap;
30 va_start (ap, fmt);
31 vwarning (fmt, ap);
32 va_end (ap);
35 /* See gdbsupport/errors.h. */
37 void
38 error (const char *fmt, ...)
40 va_list ap;
42 va_start (ap, fmt);
43 verror (fmt, ap);
44 va_end (ap);
47 /* See gdbsupport/errors.h. */
49 void
50 internal_error (const char *file, int line, const char *fmt, ...)
52 va_list ap;
54 va_start (ap, fmt);
55 internal_verror (file, line, fmt, ap);
56 va_end (ap);
59 /* See gdbsupport/errors.h. */
61 void
62 internal_warning (const char *file, int line, const char *fmt, ...)
64 va_list ap;
66 va_start (ap, fmt);
67 internal_vwarning (file, line, fmt, ap);
68 va_end (ap);