Kea 2.0.3
db_exceptions.h
Go to the documentation of this file.
1// Copyright (C) 2015-2019,2021 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
11
12namespace isc {
13namespace db {
14
21public:
22 StatementNotApplied(const char* file, size_t line, const char* what)
23 : isc::Exception(file, line, what) {
24 }
25};
26
28class MultipleRecords : public Exception {
29public:
30 MultipleRecords(const char* file, size_t line, const char* what) :
31 isc::Exception(file, line, what) {}
32};
33
35class DataTruncated : public Exception {
36public:
37 DataTruncated(const char* file, size_t line, const char* what) :
38 isc::Exception(file, line, what) {}
39};
40
42class DuplicateEntry : public Exception {
43public:
44 DuplicateEntry(const char* file, size_t line, const char* what) :
45 isc::Exception(file, line, what) {}
46};
47
49class NullKeyError : public Exception {
50public:
51 NullKeyError(const char* file, size_t line, const char* what) :
52 isc::Exception(file, line, what) {}
53};
54
56class ReadOnlyDb : public Exception {
57public:
58 ReadOnlyDb(const char* file, size_t line, const char* what) :
59 isc::Exception(file, line, what) {}
60};
61
64class InvalidRange : public Exception {
65public:
66 InvalidRange(const char* file, size_t line, const char* what) :
67 isc::Exception(file, line, what) {}
68};
69
72public:
73 InvalidAddressFamily(const char* file, size_t line, const char* what) :
74 isc::Exception(file, line, what) {}
75};
76
78class DbConfigError : public Exception {
79public:
80 DbConfigError(const char* file, size_t line, const char* what) :
81 isc::Exception(file, line, what) {}
82};
83
86class NoSuchDatabase : public Exception {
87public:
88 NoSuchDatabase(const char* file, size_t line, const char* what) :
89 isc::Exception(file, line, what) {}
90};
91
95public:
96 AmbiguousDatabase(const char* file, size_t line, const char* what) :
97 isc::Exception(file, line, what) {}
98};
99
100} // namespace isc
101} // namespace db
102
103#endif
This is a base class for exceptions thrown from the DNS library module.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
Specification of the database backend to be used yields multiple results.
Definition: db_exceptions.h:94
AmbiguousDatabase(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:96
Data is truncated.
Definition: db_exceptions.h:35
DataTruncated(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:37
Error detected in the database configuration.
Definition: db_exceptions.h:78
DbConfigError(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:80
Database duplicate entry error.
Definition: db_exceptions.h:42
DuplicateEntry(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:44
Invalid address family used as input to Lease Manager.
Definition: db_exceptions.h:71
InvalidAddressFamily(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:73
Upper bound address is lower than lower bound address while retrieving a range of leases.
Definition: db_exceptions.h:64
InvalidRange(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:66
Multiple lease records found where one expected.
Definition: db_exceptions.h:28
MultipleRecords(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:30
Error when specified database could not be found in the server configuration.
Definition: db_exceptions.h:86
NoSuchDatabase(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:88
Key is NULL but was specified NOT NULL.
Definition: db_exceptions.h:49
NullKeyError(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:51
Attempt to modify data in read-only database.
Definition: db_exceptions.h:56
ReadOnlyDb(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:58
Database statement not applied.
Definition: db_exceptions.h:20
StatementNotApplied(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:22
Defines the logger used by the top-level component of kea-lfc.