Kea 2.5.8
db_exceptions.h
Go to the documentation of this file.
1// Copyright (C) 2015-2023 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
16class MultipleRecords : public Exception {
17public:
18 MultipleRecords(const char* file, size_t line, const char* what) :
19 isc::Exception(file, line, what) {}
20};
21
23class DataTruncated : public Exception {
24public:
25 DataTruncated(const char* file, size_t line, const char* what) :
26 isc::Exception(file, line, what) {}
27};
28
30class DuplicateEntry : public Exception {
31public:
32 DuplicateEntry(const char* file, size_t line, const char* what) :
33 isc::Exception(file, line, what) {}
34};
35
37class NullKeyError : public Exception {
38public:
39 NullKeyError(const char* file, size_t line, const char* what) :
40 isc::Exception(file, line, what) {}
41};
42
44class ReadOnlyDb : public Exception {
45public:
46 ReadOnlyDb(const char* file, size_t line, const char* what) :
47 isc::Exception(file, line, what) {}
48};
49
52class InvalidRange : public Exception {
53public:
54 InvalidRange(const char* file, size_t line, const char* what) :
55 isc::Exception(file, line, what) {}
56};
57
60public:
61 InvalidAddressFamily(const char* file, size_t line, const char* what) :
62 isc::Exception(file, line, what) {}
63};
64
66class DbConfigError : public Exception {
67public:
68 DbConfigError(const char* file, size_t line, const char* what) :
69 isc::Exception(file, line, what) {}
70};
71
74class NoSuchDatabase : public Exception {
75public:
76 NoSuchDatabase(const char* file, size_t line, const char* what) :
77 isc::Exception(file, line, what) {}
78};
79
83public:
84 AmbiguousDatabase(const char* file, size_t line, const char* what) :
85 isc::Exception(file, line, what) {}
86};
87
90class NoRowsAffected : public Exception {
91public:
92 NoRowsAffected(const char* file, size_t line, const char* what) :
93 isc::Exception(file, line, what) {}
94};
95
96} // namespace isc
97} // namespace db
98
99#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:82
AmbiguousDatabase(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:84
Data is truncated.
Definition: db_exceptions.h:23
DataTruncated(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:25
Error detected in the database configuration.
Definition: db_exceptions.h:66
DbConfigError(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:68
Database duplicate entry error.
Definition: db_exceptions.h:30
DuplicateEntry(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:32
Invalid address family used as input to Lease Manager.
Definition: db_exceptions.h:59
InvalidAddressFamily(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:61
Upper bound address is lower than lower bound address while retrieving a range of leases.
Definition: db_exceptions.h:52
InvalidRange(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:54
Multiple lease records found where one expected.
Definition: db_exceptions.h:16
MultipleRecords(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:18
Thrown when it is expected that some rows are affected, usually during a DELETE or an UPDATE,...
Definition: db_exceptions.h:90
NoRowsAffected(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:92
Error when specified database could not be found in the server configuration.
Definition: db_exceptions.h:74
NoSuchDatabase(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:76
Key is NULL but was specified NOT NULL.
Definition: db_exceptions.h:37
NullKeyError(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:39
Attempt to modify data in read-only database.
Definition: db_exceptions.h:44
ReadOnlyDb(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:46
Defines the logger used by the top-level component of kea-lfc.