Porytiles
Loading...
Searching...
No Matches
null_user_diagnostics.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <vector>
5
6#include "gsl/pointers"
7
10
11namespace porytiles {
12
26 public:
27 explicit NullUserDiagnostics(gsl::not_null<const TextFormatter *> format) : UserDiagnostics{format} {}
28
29 void remark(const std::string & /*tag*/, const std::vector<std::string> & /*lines*/) const override
30 {
31 // Silent: no output
32 }
33
34 void warning(const std::string & /*tag*/, const std::vector<std::string> & /*lines*/) const override
35 {
36 // Silent: no output
37 }
38
39 void error(const std::string & /*tag*/, const std::vector<std::string> & /*lines*/) const override
40 {
41 // Silent: no output
42 }
43
44 void remark_note(const std::string & /*tag*/, const std::vector<std::string> & /*lines*/) const override
45 {
46 // Silent: no output
47 }
48
49 void warning_note(const std::string & /*tag*/, const std::vector<std::string> & /*lines*/) const override
50 {
51 // Silent: no output
52 }
53
54 void error_note(const std::string & /*tag*/, const std::vector<std::string> & /*lines*/) const override
55 {
56 // Silent: no output
57 }
58
59 void emit_fatal_proximate(const Error & /*err*/) const override
60 {
61 // Silent: no output
62 }
63
64 void emit_fatal_step(const Error & /*err*/) const override
65 {
66 // Silent: no output
67 }
68
69 void emit_fatal_root(const Error & /*err*/) const override
70 {
71 // Silent: no output
72 }
73};
74
75} // namespace porytiles
Abstract interface for all error types used in ChainableResult error chains.
Definition error.hpp:19
Silent diagnostics implementation that suppresses all output.
void emit_fatal_proximate(const Error &) const override
Emit the proximate (immediate) error in a fatal error chain.
void emit_fatal_step(const Error &) const override
Emit an intermediate step error in a fatal error chain.
NullUserDiagnostics(gsl::not_null< const TextFormatter * > format)
void error_note(const std::string &, const std::vector< std::string > &) const override
Display a tagged note message associated with an error.
void remark(const std::string &, const std::vector< std::string > &) const override
Display a tagged remark message.
void error(const std::string &, const std::vector< std::string > &) const override
Display a tagged error message.
void warning(const std::string &, const std::vector< std::string > &) const override
Display a tagged warning message.
void remark_note(const std::string &, const std::vector< std::string > &) const override
Display a tagged note message associated with a remark.
void warning_note(const std::string &, const std::vector< std::string > &) const override
Display a tagged note message associated with a warning.
void emit_fatal_root(const Error &) const override
Emit the root cause error in a fatal error chain.
Abstract class for structured error reporting and diagnostic output.