Kea 3.1.1
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
Exception(const char *file, size_t line, const char *what)
Constructor for a given type for exceptions with file name and file line number.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
AmbiguousDatabase(const char *file, size_t line, const char *what)
DataTruncated(const char *file, size_t line, const char *what)
DbConfigError(const char *file, size_t line, const char *what)
DuplicateEntry(const char *file, size_t line, const char *what)
InvalidAddressFamily(const char *file, size_t line, const char *what)
InvalidRange(const char *file, size_t line, const char *what)
MultipleRecords(const char *file, size_t line, const char *what)
NoRowsAffected(const char *file, size_t line, const char *what)
NoSuchDatabase(const char *file, size_t line, const char *what)
NullKeyError(const char *file, size_t line, const char *what)
ReadOnlyDb(const char *file, size_t line, const char *what)
Defines the logger used by the top-level component of kea-lfc.