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
24 public:
25 explicit NullUserDiagnostics(gsl::not_null<const TextFormatter *> format) : UserDiagnostics{format} {}
26
27 void remark(const std::string & /*tag*/, const std::vector<std::string> & /*lines*/) const override
28 {
29 // Silent: no output
30 }
31
32 void warning(const std::string & /*tag*/, const std::vector<std::string> & /*lines*/) const override
33 {
34 // Silent: no output
35 }
36
37 void error(const std::string & /*tag*/, const std::vector<std::string> & /*lines*/) const override
38 {
39 // Silent: no output
40 }
41
42 void remark_note(const std::string & /*tag*/, const std::vector<std::string> & /*lines*/) const override
43 {
44 // Silent: no output
45 }
46
47 void warning_note(const std::string & /*tag*/, const std::vector<std::string> & /*lines*/) const override
48 {
49 // Silent: no output
50 }
51
52 void error_note(const std::string & /*tag*/, const std::vector<std::string> & /*lines*/) const override
53 {
54 // Silent: no output
55 }
56
57 void emit_fatal_proximate(const Error & /*err*/) const override
58 {
59 // Silent: no output
60 }
61
62 void emit_fatal_step(const Error & /*err*/) const override
63 {
64 // Silent: no output
65 }
66
67 void emit_fatal_root(const Error & /*err*/) const override
68 {
69 // Silent: no output
70 }
71};
72
73} // namespace porytiles
Abstract interface for all error types used in ChainableResult error chains.
Definition error.hpp:17
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.