LCOV - code coverage report
Current view: top level - snaplogger - exception.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 5 8 62.5 %
Date: 2019-08-24 13:53:02 Functions: 10 24 41.7 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.12