Kea: db_exceptions.h Source File

| Kea 2.2.0

db_exceptions.h
Go to the documentation of this file.
1// Copyright (C) 2015-2022 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#ifndef DB_EXCEPTIONS_H
8#define DB_EXCEPTIONS_H
9
10#include <exceptions/exceptions.h>
11
12namespace isc {
13namespace db {
14
16 class MultipleRecords : public Exception {
17public:
18 MultipleRecords(const char* file, size_t line, const char* what) :
19 isc::Exception(file, line, what) {}
20};
21
23 class DataTruncated : public Exception {
24public:
25 DataTruncated(const char* file, size_t line, const char* what) :
26 isc::Exception(file, line, what) {}
27};
28
30 class DuplicateEntry : public Exception {
31public:
32 DuplicateEntry(const char* file, size_t line, const char* what) :
33 isc::Exception(file, line, what) {}
34};
35
37 class NullKeyError : public Exception {
38public:
39 NullKeyError(const char* file, size_t line, const char* what) :
40 isc::Exception(file, line, what) {}
41};
42
44 class ReadOnlyDb : public Exception {
45public:
46 ReadOnlyDb(const char* file, size_t line, const char* what) :
47 isc::Exception(file, line, what) {}
48};
49
52 class InvalidRange : public Exception {
53public:
54 InvalidRange(const char* file, size_t line, const char* what) :
55 isc::Exception(file, line, what) {}
56};
57
59 class InvalidAddressFamily : public Exception {
60public:
61 InvalidAddressFamily(const char* file, size_t line, const char* what) :
62 isc::Exception(file, line, what) {}
63};
64
66 class DbConfigError : public Exception {
67public:
68 DbConfigError(const char* file, size_t line, const char* what) :
69 isc::Exception(file, line, what) {}
70};
71
74 class NoSuchDatabase : public Exception {
75public:
76 NoSuchDatabase(const char* file, size_t line, const char* what) :
77 isc::Exception(file, line, what) {}
78};
79
82 class AmbiguousDatabase : public Exception {
83public:
84 AmbiguousDatabase(const char* file, size_t line, const char* what) :
85 isc::Exception(file, line, what) {}
86};
87
88} // namespace isc
89} // namespace db
90
91#endif
isc::Exception
This is a base class for exceptions thrown from the DNS library module.
Definition: exceptions/exceptions.h:23
isc::Exception::what
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
Definition: exceptions/exceptions.cc:32
isc::db::AmbiguousDatabase
Specification of the database backend to be used yields multiple results.
Definition: db_exceptions.h:82
isc::db::AmbiguousDatabase::AmbiguousDatabase
AmbiguousDatabase(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:84
isc::db::DataTruncated
Data is truncated.
Definition: db_exceptions.h:23
isc::db::DataTruncated::DataTruncated
DataTruncated(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:25
isc::db::DbConfigError
Error detected in the database configuration.
Definition: db_exceptions.h:66
isc::db::DbConfigError::DbConfigError
DbConfigError(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:68
isc::db::DuplicateEntry
Database duplicate entry error.
Definition: db_exceptions.h:30
isc::db::DuplicateEntry::DuplicateEntry
DuplicateEntry(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:32
isc::db::InvalidAddressFamily
Invalid address family used as input to Lease Manager.
Definition: db_exceptions.h:59
isc::db::InvalidAddressFamily::InvalidAddressFamily
InvalidAddressFamily(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:61
isc::db::InvalidRange
Upper bound address is lower than lower bound address while retrieving a range of leases.
Definition: db_exceptions.h:52
isc::db::InvalidRange::InvalidRange
InvalidRange(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:54
isc::db::MultipleRecords
Multiple lease records found where one expected.
Definition: db_exceptions.h:16
isc::db::MultipleRecords::MultipleRecords
MultipleRecords(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:18
isc::db::NoSuchDatabase
Error when specified database could not be found in the server configuration.
Definition: db_exceptions.h:74
isc::db::NoSuchDatabase::NoSuchDatabase
NoSuchDatabase(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:76
isc::db::NullKeyError
Key is NULL but was specified NOT NULL.
Definition: db_exceptions.h:37
isc::db::NullKeyError::NullKeyError
NullKeyError(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:39
isc::db::ReadOnlyDb
Attempt to modify data in read-only database.
Definition: db_exceptions.h:44
isc::db::ReadOnlyDb::ReadOnlyDb
ReadOnlyDb(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:46
exceptions.h
isc
Defines the logger used by the top-level component of kea-lfc.
Definition: agent_parser.cc:143