SOLA
Loading...
Searching...
No Matches
fsm_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_FSM_EXCEPTION_H_
8#define MINHTON_FSM_EXCEPTION_H_
9
10#include <cstdint>
11#include <stdexcept>
12#include <string>
13
14#include "minhton/utils/fsm.h"
15
16namespace minhton {
17
18class FSMException : public std::exception {
19public:
20 explicit FSMException(const std::string &message) noexcept;
21
22 FSMException(FSMState previous_state, SendMessage event, const std::string &message) noexcept;
23 FSMException(FSMState previous_state, ReceiveMessage event, const std::string &message) noexcept;
24 FSMException(FSMState previous_state, Signal event, const std::string &message) noexcept;
25 FSMException(FSMState previous_state, Timeout event, const std::string &message) noexcept;
26
27 ~FSMException() override = default;
28 const char *what() const noexcept override;
29
30private:
31 std::string error_message_;
32};
33
34} // namespace minhton
35#endif
Definition fsm_exception.h:18
Definition minhton_watchdog_ns3.cpp:24
Definition fsm.h:17
Definition fsm.h:22
Definition fsm.h:26
Definition fsm.h:49