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
11
12namespace isc {
13namespace db {
14
21public:
22 StatementNotApplied(const char* file, size_t line, const char* what)
23 : isc::Exception(file, line, what) {
24 }
25};
26
28class MultipleRecords : public Exception {
29public:
30 MultipleRecords(const char* file, size_t line, const char* what) :
31 isc::Exception(file, line, what) {}
32};
33
35class DataTruncated : public Exception {
36public:
37 DataTruncated(const char* file, size_t line, const char* what) :
38 isc::Exception(file, line, what) {}
39};
40
42class DuplicateEntry : public Exception {
43public:
44 DuplicateEntry(const char* file, size_t line, const char* what) :
45 isc::Exception(file, line, what) {}
46};
47
49class ReadOnlyDb : public Exception {
50public:
51 ReadOnlyDb(const char* file, size_t line, const char* what) :
52 isc::Exception(file, line, what) {}
53};
54
57class InvalidRange : public Exception {
58public:
59 InvalidRange(const char* file, size_t line, const char* what) :
60 isc::Exception(file, line, what) {}
61};
62
65public:
66 InvalidAddressFamily(const char* file, size_t line, const char* what) :
67 isc::Exception(file, line, what) {}
68};
69
71class DbConfigError : public Exception {
72public:
73 DbConfigError(const char* file, size_t line, const char* what) :
74 isc::Exception(file, line, what) {}
75};
76
79class NoSuchDatabase : public Exception {
80public:
81 NoSuchDatabase(const char* file, size_t line, const char* what) :
82 isc::Exception(file, line, what) {}
83};
84
88public:
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
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.
Definition: db_exceptions.h:87
AmbiguousDatabase(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:89
Data is truncated.
Definition: db_exceptions.h:35
DataTruncated(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:37
Error detected in the database configuration.
Definition: db_exceptions.h:71
DbConfigError(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:73
Database duplicate entry error.
Definition: db_exceptions.h:42
DuplicateEntry(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:44
Invalid address family used as input to Lease Manager.
Definition: db_exceptions.h:64
InvalidAddressFamily(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:66
Upper bound address is lower than lower bound address while retrieving a range of leases.
Definition: db_exceptions.h:57
InvalidRange(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:59
Multiple lease records found where one expected.
Definition: db_exceptions.h:28
MultipleRecords(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:30
Error when specified database could not be found in the server configuration.
Definition: db_exceptions.h:79
NoSuchDatabase(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:81
Attempt to modify data in read-only database.
Definition: db_exceptions.h:49
ReadOnlyDb(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:51
Database statement not applied.
Definition: db_exceptions.h:20
StatementNotApplied(const char *file, size_t line, const char *what)
Definition: db_exceptions.h:22
Defines the logger used by the top-level component of kea-dhcp-ddns.