Kea  2.3.5-git
db_exceptions.h
Go to the documentation of this file.
1 // Copyright (C) 2015-2022 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 
16 class MultipleRecords : public Exception {
17 public:
18  MultipleRecords(const char* file, size_t line, const char* what) :
19  isc::Exception(file, line, what) {}
20 };
21 
23 class DataTruncated : public Exception {
24 public:
25  DataTruncated(const char* file, size_t line, const char* what) :
26  isc::Exception(file, line, what) {}
27 };
28 
30 class DuplicateEntry : public Exception {
31 public:
32  DuplicateEntry(const char* file, size_t line, const char* what) :
33  isc::Exception(file, line, what) {}
34 };
35 
37 class NullKeyError : public Exception {
38 public:
39  NullKeyError(const char* file, size_t line, const char* what) :
40  isc::Exception(file, line, what) {}
41 };
42 
44 class ReadOnlyDb : public Exception {
45 public:
46  ReadOnlyDb(const char* file, size_t line, const char* what) :
47  isc::Exception(file, line, what) {}
48 };
49 
52 class InvalidRange : public Exception {
53 public:
54  InvalidRange(const char* file, size_t line, const char* what) :
55  isc::Exception(file, line, what) {}
56 };
57 
60 public:
61  InvalidAddressFamily(const char* file, size_t line, const char* what) :
62  isc::Exception(file, line, what) {}
63 };
64 
66 class DbConfigError : public Exception {
67 public:
68  DbConfigError(const char* file, size_t line, const char* what) :
69  isc::Exception(file, line, what) {}
70 };
71 
74 class NoSuchDatabase : public Exception {
75 public:
76  NoSuchDatabase(const char* file, size_t line, const char* what) :
77  isc::Exception(file, line, what) {}
78 };
79 
82 class AmbiguousDatabase : public Exception {
83 public:
84  AmbiguousDatabase(const char* file, size_t line, const char* what) :
85  isc::Exception(file, line, what) {}
86 };
87 
88 } // namespace isc
89 } // namespace db
90 
91 #endif
InvalidRange(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:54
Data is truncated.
Definition: db_exceptions.h:23
MultipleRecords(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:18
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
NoSuchDatabase(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:76
Multiple lease records found where one expected.
Definition: db_exceptions.h:16
DataTruncated(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:25
ReadOnlyDb(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:46
DbConfigError(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:68
AmbiguousDatabase(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:84
Error detected in the database configuration.
Definition: db_exceptions.h:66
Invalid address family used as input to Lease Manager.
Definition: db_exceptions.h:59
This is a base class for exceptions thrown from the DNS library module.
Defines the logger used by the top-level component of kea-lfc.
DuplicateEntry(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:32
Attempt to modify data in read-only database.
Definition: db_exceptions.h:44
NullKeyError(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:39
InvalidAddressFamily(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:61
Error when specified database could not be found in the server configuration.
Definition: db_exceptions.h:74
Upper bound address is lower than lower bound address while retrieving a range of leases...
Definition: db_exceptions.h:52
Key is NULL but was specified NOT NULL.
Definition: db_exceptions.h:37
Specification of the database backend to be used yields multiple results.
Definition: db_exceptions.h:82
Database duplicate entry error.
Definition: db_exceptions.h:30