Yet Another HTTP Library: /home/cmouse/projects/libyahttp/yahttp/exception.hpp Source File

Yet Another HTTP Library yahttp

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
exception.hpp
Go to the documentation of this file.
1 #ifndef _YAHTTP_EXCEPTION_HPP
2 #define _YAHTTP_EXCEPTION_HPP 1
3
4 #include <exception>
5
6 namespace YaHTTP {
8 class Error: public std::exception {
9 public:
10 Error() {};
11 Error(const std::string& reason): reason(reason) {};
12 virtual ~Error() throw() {};
13
14 virtual const char* what() const throw()
15 {
16 return reason.c_str();
17 }
18 const std::string reason; //<! Cause of the error
19 };
21 class ParseError: public YaHTTP::Error {
22 public:
23 ParseError() {};
24 ParseError(const std::string& reason): Error(reason) {};
25 };
26 };
27
28 #endif
YaHTTP::ParseError::ParseError
ParseError()
Definition: exception.hpp:23
YaHTTP::Error
Definition: exception.hpp:8
YaHTTP::Error::~Error
virtual ~Error()
Definition: exception.hpp:12
YaHTTP::Error::what
virtual const char * what() const
Definition: exception.hpp:14
YaHTTP::Error::Error
Error()
Definition: exception.hpp:10
YaHTTP::ParseError
Definition: exception.hpp:21
YaHTTP::ParseError::ParseError
ParseError(const std::string &reason)
Definition: exception.hpp:24
YaHTTP::Error::reason
const std::string reason
Definition: exception.hpp:18
YaHTTP::Error::Error
Error(const std::string &reason)
Definition: exception.hpp:11