Kea 2.7.6
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.
AmbiguousDatabase(const char *file, size_t line, const char *what)
Data is truncated.
DataTruncated(const char *file, size_t line, const char *what)
Error detected in the database configuration.
DbConfigError(const char *file, size_t line, const char *what)
Database duplicate entry error.
DuplicateEntry(const char *file, size_t line, const char *what)
Invalid address family used as input to Lease Manager.
InvalidAddressFamily(const char *file, size_t line, const char *what)
Upper bound address is lower than lower bound address while retrieving a range of leases.
InvalidRange(const char *file, size_t line, const char *what)
Multiple lease records found where one expected.
MultipleRecords(const char *file, size_t line, const char *what)
Thrown when it is expected that some rows are affected, usually during a DELETE or an UPDATE,...
NoRowsAffected(const char *file, size_t line, const char *what)
Error when specified database could not be found in the server configuration.
NoSuchDatabase(const char *file, size_t line, const char *what)
Key is NULL but was specified NOT NULL.
NullKeyError(const char *file, size_t line, const char *what)
Attempt to modify data in read-only database.
ReadOnlyDb(const char *file, size_t line, const char *what)
Defines the logger used by the top-level component of kea-lfc.