Aktualizr
C++ SOTA Client
exceptions.h
1 #ifndef EXCEPTIONS_H_
2 #define EXCEPTIONS_H_
3 
4 #include <stdexcept>
5 #include <string>
6 #include "logging/logging.h"
7 
8 class FatalException : public std::logic_error {
9  public:
10  explicit FatalException(const std::string &what_arg) : std::logic_error(what_arg.c_str()) { LOG_FATAL << what_arg; }
11  ~FatalException() noexcept override = default;
12 };
13 
14 class NotImplementedException : public std::logic_error {
15  public:
16  NotImplementedException() : std::logic_error("Function not yet implemented.") {}
17  ~NotImplementedException() noexcept override = default;
18 };
19 
20 #endif
FatalException
Definition: exceptions.h:8
NotImplementedException
Definition: exceptions.h:14