SOLA
Loading...
Searching...
No Matches
minhton
include
minhton
exception
algorithm_exception.h
1
// Copyright The SOLA Contributors
2
//
3
// Licensed under the MIT License.
4
// For details on the licensing terms, see the LICENSE file.
5
// SPDX-License-Identifier: MIT
6
7
#ifndef MINHTON_ALGORITHMS_EXCEPTION_H_
8
#define MINHTON_ALGORITHMS_EXCEPTION_H_
9
10
#include <cstdint>
11
#include <stdexcept>
12
#include <string>
13
14
namespace
minhton
{
15
16
enum class
AlgorithmType : uint8_t {
17
kUndefinedAlgorithm = 0,
18
kJoinAlgorithm = 1,
19
kLeaveAlgorithm = 2,
20
kUpdatingAlgorithm = 4,
21
};
22
23
class
AlgorithmException
:
public
std::exception {
24
public
:
25
explicit
AlgorithmException
(
const
std::string &message)
noexcept
;
26
AlgorithmException
(AlgorithmType type,
const
std::string &message)
noexcept
;
27
~AlgorithmException
()
override
=
default
;
28
const
char
*what()
const
noexcept
override
;
29
static
std::string getAlgorithmTypeString(AlgorithmType type);
30
31
private
:
32
AlgorithmType type_;
33
std::string error_message_;
34
};
35
36
}
// namespace minhton
37
#endif
minhton::AlgorithmException
Definition
algorithm_exception.h:23
minhton
Definition
minhton_watchdog_ns3.cpp:24
Generated by
1.9.8