From: Tomek Mrugalski Date: Thu, 8 Oct 2015 22:23:34 +0000 (+0200) Subject: [3682] Missing db_exceptions.h added. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3325936bb1de4a567810b7cffebb852a4e76610;p=thirdparty%2Fkea.git [3682] Missing db_exceptions.h added. --- diff --git a/src/lib/dhcpsrv/db_exceptions.h b/src/lib/dhcpsrv/db_exceptions.h new file mode 100644 index 0000000000..06bf97a410 --- /dev/null +++ b/src/lib/dhcpsrv/db_exceptions.h @@ -0,0 +1,47 @@ +// Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC") +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +// AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +// PERFORMANCE OF THIS SOFTWARE. + +#ifndef DB_EXCEPTIONS_H +#define DB_EXCEPTIONS_H + +#include + +namespace isc { +namespace dhcp { + +/// @brief Multiple lease records found where one expected +class MultipleRecords : public Exception { +public: + MultipleRecords(const char* file, size_t line, const char* what) : + isc::Exception(file, line, what) {} +}; + +/// @brief Attempt to update lease that was not there +class NoSuchLease : public Exception { +public: + NoSuchLease(const char* file, size_t line, const char* what) : + isc::Exception(file, line, what) {} +}; + +/// @brief Data is truncated +class DataTruncated : public Exception { +public: + DataTruncated(const char* file, size_t line, const char* what) : + isc::Exception(file, line, what) {} +}; + +}; +}; + +#endif