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