Porytiles
Loading...
Searching...
No Matches
buffered_user_diagnostics.cpp
Go to the documentation of this file.
2
3#include <string>
4#include <vector>
5
7
8namespace porytiles {
9
10void BufferedUserDiagnostics::remark(const std::string &tag, const std::vector<std::string> &lines) const
11{
12 remarks_.push_back(lines);
13 remark_tag_counts_[tag]++;
14}
15
16void BufferedUserDiagnostics::remark_note(const std::string &tag, const std::vector<std::string> &lines) const
17{
18 remark_notes_.push_back(lines);
19 remark_note_tag_counts_[tag]++;
20}
21
22void BufferedUserDiagnostics::warning_note(const std::string &tag, const std::vector<std::string> &lines) const
23{
24 warning_notes_.push_back(lines);
25 warning_note_tag_counts_[tag]++;
26}
27
28void BufferedUserDiagnostics::error_note(const std::string &tag, const std::vector<std::string> &lines) const
29{
30 error_notes_.push_back(lines);
31 error_note_tag_counts_[tag]++;
32}
33
34void BufferedUserDiagnostics::warning(const std::string &tag, const std::vector<std::string> &lines) const
35{
36 warnings_.push_back(lines);
37 warning_tag_counts_[tag]++;
38}
39
40void BufferedUserDiagnostics::error(const std::string &tag, const std::vector<std::string> &lines) const
41{
42 errors_.push_back(lines);
43 error_tag_counts_[tag]++;
44}
45
47{
48 fatal_proximates_.push_back(err.details(formatter()));
49}
50
52{
53 fatal_steps_.push_back(err.details(formatter()));
54}
55
57{
58 fatal_roots_.push_back(err.details(formatter()));
59}
60
61} // namespace porytiles
void warning_note(const std::string &tag, const std::vector< std::string > &lines) const override
Display a tagged note message associated with a warning.
void warning(const std::string &tag, const std::vector< std::string > &lines) const override
Display a tagged warning message.
void emit_fatal_step(const Error &err) const override
Emit an intermediate step error in a fatal error chain.
void emit_fatal_root(const Error &err) const override
Emit the root cause error in a fatal error chain.
void emit_fatal_proximate(const Error &err) const override
Emit the proximate (immediate) error in a fatal error chain.
void error(const std::string &tag, const std::vector< std::string > &lines) const override
Display a tagged error message.
void remark(const std::string &tag, const std::vector< std::string > &lines) const override
Display a tagged remark message.
void remark_note(const std::string &tag, const std::vector< std::string > &lines) const override
Display a tagged note message associated with a remark.
void error_note(const std::string &tag, const std::vector< std::string > &lines) const override
Display a tagged note message associated with an error.
Abstract interface for all error types used in ChainableResult error chains.
Definition error.hpp:19
virtual std::vector< std::string > details(const TextFormatter &formatter) const =0
Returns a formatted multi-line string representation of the error.
const TextFormatter & formatter() const