C++ Utilities 5.26.1
Useful C++ classes and routines such as argument parser, IO and conversion utilities
Loading...
Searching...
No Matches
parseerror.h
Go to the documentation of this file.
1#ifndef APPLICATION_UTILITIES_PARSE_ERROR_H
2#define APPLICATION_UTILITIES_PARSE_ERROR_H
3
4#include "../global.h"
5
6#include <iosfwd>
7#include <stdexcept>
8
9namespace CppUtilities {
10
11class CPP_UTILITIES_EXPORT ParseError : public std::runtime_error {
12public:
13 ParseError();
14 ParseError(const std::string &what);
15 ~ParseError() noexcept override;
16};
17
22 : std::runtime_error("undetermined parsing")
23{
24}
25
29inline ParseError::ParseError(const std::string &what)
30 : std::runtime_error(what)
31{
32}
33
34CPP_UTILITIES_EXPORT std::ostream &operator<<(std::ostream &o, const ParseError &failure);
35
36} // namespace CppUtilities
37
38#endif // APPLICATION_UTILITIES_PARSE_ERROR_H
The ParseError class is thrown by an ArgumentParser when a parsing error occurs.
Definition parseerror.h:11
ParseError()
Constructs a new ParseError.
Definition parseerror.h:21
#define CPP_UTILITIES_EXPORT
Marks the symbol to be exported by the c++utilities library.
Definition global.h:14
Contains all utilities provides by the c++utilities library.
CPP_UTILITIES_EXPORT std::ostream & operator<<(std::ostream &out, Indentation indentation)
STL namespace.