Kea  1.5.0
db_exceptions.h
Go to the documentation of this file.
1 // Copyright (C) 2015-2018 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 ReadOnlyDb : public Exception {
50 public:
51  ReadOnlyDb(const char* file, size_t line, const char* what) :
52  isc::Exception(file, line, what) {}
53 };
54 
57 class InvalidRange : public Exception {
58 public:
59  InvalidRange(const char* file, size_t line, const char* what) :
60  isc::Exception(file, line, what) {}
61 };
62 
65 public:
66  InvalidAddressFamily(const char* file, size_t line, const char* what) :
67  isc::Exception(file, line, what) {}
68 };
69 
71 class DbConfigError : public Exception {
72 public:
73  DbConfigError(const char* file, size_t line, const char* what) :
74  isc::Exception(file, line, what) {}
75 };
76 
79 class NoSuchDatabase : public Exception {
80 public:
81  NoSuchDatabase(const char* file, size_t line, const char* what) :
82  isc::Exception(file, line, what) {}
83 };
84 
87 class AmbiguousDatabase : public Exception {
88 public:
89  AmbiguousDatabase(const char* file, size_t line, const char* what) :
90  isc::Exception(file, line, what) {}
91 };
92 
93 } // namespace isc
94 } // namespace db
95 
96 #endif
Database statement not applied.
Definition: db_exceptions.h:20
InvalidRange(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:59
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
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:81
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:51
DbConfigError(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:73
AmbiguousDatabase(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:89
Error detected in the database configuration.
Definition: db_exceptions.h:71
Invalid address family used as input to Lease Manager.
Definition: db_exceptions.h:64
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:49
InvalidAddressFamily(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:66
Error when specified database could not be found in the server configuration.
Definition: db_exceptions.h:79
Upper bound address is lower than lower bound address while retrieving a range of leases.
Definition: db_exceptions.h:57
Specification of the database backend to be used yields multiple results.
Definition: db_exceptions.h:87
Database duplicate entry error.
Definition: db_exceptions.h:42