Kea 2.7.0
dummy_io_cb.h
Go to the documentation of this file.
1// Copyright (C) 2011-2024 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 DUMMY_IO_CB_H
8#define DUMMY_IO_CB_H
9
10#include <iostream>
11
13
14#include <boost/asio/error.hpp>
15
16namespace isc {
17namespace asiolink {
18
29
31public:
32
38 void operator()(boost::system::error_code) {
39 // If the function is called, there is a serious logic error in
40 // the program (this class should not be used as the callback
41 // class). As the asiolink module is too low-level for logging
42 // errors, throw an exception.
44 "DummyIOCallback::operator() must not be called");
45 }
46
52 void operator()(boost::system::error_code, size_t) {
53 // If the function is called, there is a serious logic error in
54 // the program (this class should not be used as the callback
55 // class). As the asiolink module is too low-level for logging
56 // errors, throw an exception.
58 "DummyIOCallback::operator() must not be called");
59 }
60};
61
62} // namespace asiolink
63} // namespace isc
64
65#endif // DUMMY_IO_CB_H
A generic exception that is thrown when an unexpected error condition occurs.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
Defines the logger used by the top-level component of kea-lfc.