LCOV - code coverage report
Current view: top level - include/daemon/backend - exceptions.hpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 2 3 66.7 %
Date: 2024-04-23 00:09:24 Functions: 0 0 -
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :   Copyright 2018-2024, Barcelona Supercomputing Center (BSC), Spain
       3             :   Copyright 2015-2024, Johannes Gutenberg Universitaet Mainz, Germany
       4             : 
       5             :   This software was partially supported by the
       6             :   EC H2020 funded project NEXTGenIO (Project ID: 671951, www.nextgenio.eu).
       7             : 
       8             :   This software was partially supported by the
       9             :   ADA-FS project under the SPPEXA project funded by the DFG.
      10             : 
      11             :   This file is part of GekkoFS.
      12             : 
      13             :   GekkoFS is free software: you can redistribute it and/or modify
      14             :   it under the terms of the GNU General Public License as published by
      15             :   the Free Software Foundation, either version 3 of the License, or
      16             :   (at your option) any later version.
      17             : 
      18             :   GekkoFS is distributed in the hope that it will be useful,
      19             :   but WITHOUT ANY WARRANTY; without even the implied warranty of
      20             :   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      21             :   GNU General Public License for more details.
      22             : 
      23             :   You should have received a copy of the GNU General Public License
      24             :   along with GekkoFS.  If not, see <https://www.gnu.org/licenses/>.
      25             : 
      26             :   SPDX-License-Identifier: GPL-3.0-or-later
      27             : */
      28             : 
      29             : #ifndef GEKKOFS_DB_EXCEPTIONS_HPP
      30             : #define GEKKOFS_DB_EXCEPTIONS_HPP
      31             : 
      32             : #include <string>
      33             : #include <stdexcept>
      34             : 
      35             : namespace gkfs::metadata {
      36             : 
      37             : class DBException : public std::runtime_error {
      38             : public:
      39           0 :     explicit DBException(const std::string& s) : std::runtime_error(s){};
      40             : };
      41             : 
      42             : class NotFoundException : public DBException {
      43             : public:
      44          24 :     explicit NotFoundException(const std::string& s) : DBException(s){};
      45             : };
      46             : 
      47             : class ExistsException : public DBException {
      48             : public:
      49           3 :     explicit ExistsException(const std::string& s) : DBException(s){};
      50             : };
      51             : 
      52             : } // namespace gkfs::metadata
      53             : 
      54             : #endif // GEKKOFS_DB_EXCEPTIONS_HPP

Generated by: LCOV version 1.16