Line data Source code
1 : /*
2 : * License:
3 : * Copyright (c) 2013-2019 Made to Order Software Corp. All Rights Reserved
4 : *
5 : * https://snapwebsites.org/
6 : * contact@m2osw.com
7 : *
8 : * This program is free software; you can redistribute it and/or modify
9 : * it under the terms of the GNU General Public License as published by
10 : * the Free Software Foundation; either version 2 of the License, or
11 : * (at your option) any later version.
12 : *
13 : * This program is distributed in the hope that it will be useful,
14 : * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 : * GNU General Public License for more details.
17 : *
18 : * You should have received a copy of the GNU General Public License along
19 : * with this program; if not, write to the Free Software Foundation, Inc.,
20 : * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 : *
22 : * Authors:
23 : * Alexis Wilke alexis@m2osw.com
24 : */
25 : #pragma once
26 :
27 : /** \file
28 : * \brief Logger exceptions.
29 : *
30 : * This files declares a few exceptions that the logger uses when a
31 : * parameter is wrong. Note that many runtime errors get \em eaten
32 : * up by the system because there isn't much you can do if the logger
33 : * itself fails.
34 : *
35 : * However, some of the setup can generate exceptions because those
36 : * errors should be fixed before you go on. For example, if you try
37 : * to change a system severity level or define two `severity` objects
38 : * with the same name, then you'll get one of those exceptions. In
39 : * most cases, those do not need to be handled. Instead, they should
40 : * be fixed.
41 : */
42 :
43 :
44 : // libexcept lib
45 : //
46 : #include <libexcept/exception.h>
47 :
48 :
49 : namespace snaplogger
50 : {
51 :
52 :
53 :
54 0 : DECLARE_LOGIC_ERROR(logger_logic_error);
55 :
56 0 : DECLARE_MAIN_EXCEPTION(fatal_error);
57 0 : DECLARE_MAIN_EXCEPTION(logger_error);
58 :
59 0 : DECLARE_EXCEPTION(logger_error, duplicate_error);
60 0 : DECLARE_EXCEPTION(logger_error, invalid_variable);
61 0 : DECLARE_EXCEPTION(logger_error, invalid_parameter);
62 0 : DECLARE_EXCEPTION(logger_error, invalid_severity);
63 :
64 :
65 :
66 : } // namespace snaplogger
67 : // vim: ts=4 sw=4 et
|