blob: 208c4f5c50b2d1a37ad7c063e929711c2a9eef56 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#ifndef NEWSBOAT_CONFIGHANDLEREXCEPTION_H_
#define NEWSBOAT_CONFIGHANDLEREXCEPTION_H_
#include <stdexcept>
#include <string>
#include "configparser.h"
namespace newsboat {
class ConfigHandlerException : public std::exception {
public:
explicit ConfigHandlerException(const std::string& emsg)
: msg(emsg)
{
}
explicit ConfigHandlerException(ActionHandlerStatus e);
~ConfigHandlerException() throw() override {}
const char* what() const throw() override
{
return msg.c_str();
}
int status()
{
return 0;
}
private:
const char* get_errmsg(ActionHandlerStatus e);
std::string msg;
};
} // namespace newsboat
#endif /* NEWSBOAT_CONFIGHANDLEREXCEPTION_H_ */
|