C++ Utilities  5.10.5
Useful C++ classes and routines such as argument parser, IO and conversion utilities
parseerror.cpp
Go to the documentation of this file.
1 #include "./parseerror.h"
2 
3 #include "../io/ansiescapecodes.h"
4 
5 #include <iostream>
6 
7 namespace CppUtilities {
8 
20 {
21 }
22 
26 std::ostream &operator<<(std::ostream &o, const ParseError &failure)
27 {
28  using namespace std;
29  using namespace EscapeCodes;
30  return o << Phrases::Error << "Unable to parse arguments: " << TextAttribute::Reset << failure.what() << "\nSee --help for available commands."
31  << endl;
32 }
33 
34 } // namespace CppUtilities
The ParseError class is thrown by an ArgumentParser when a parsing error occurs.
Definition: parseerror.h:11
~ParseError() noexcept override
Destroys the ParseError.
Definition: parseerror.cpp:19
Contains all utilities provides by the c++utilities library.
CPP_UTILITIES_EXPORT std::ostream & operator<<(std::ostream &out, Indentation indentation)