35 #ifndef MULTOVL_ERRORS_HEADER
36 #define MULTOVL_ERRORS_HEADER
57 const std::string& errprefix =
"ERROR",
58 const std::string& warnprefix =
"WARNING"
87 std::string
last_error()
const {
return (
ok()?
"" : _errors.back()); }
92 std::ostream&
print(std::ostream& outf,
bool warnings=
true)
const;
99 std::vector<std::string> _errors, _warnings;
100 std::string _errprefix, _warnprefix;
105 #endif // MULTOVL_ERRORS_HEADER
void add_error(const std::string &msg)
void clear()
Tell the calling object to forget all errors and warnings seen so far.
void add_warning(const std::string &msg)
unsigned int error_count() const
Definition: errors.hh:75
Errors & operator+=(const Errors &another)
bool ok() const
Definition: errors.hh:81
unsigned int warning_count() const
Definition: errors.hh:78
std::ostream & print(std::ostream &outf, bool warnings=true) const
bool perfect() const
Definition: errors.hh:84
Errors(const std::string &errprefix="ERROR", const std::string &warnprefix="WARNING")
Simple facility to keep track of errors and warnings.
Definition: errors.hh:49
std::string last_error() const
Definition: errors.hh:87