|
Porytiles
|
Silent diagnostics implementation that suppresses all output. More...
#include <null_user_diagnostics.hpp>
Public Member Functions | |
| NullUserDiagnostics (gsl::not_null< const TextFormatter * > format) | |
| void | remark (const std::string &, const std::vector< std::string > &) const override |
| Display a tagged remark message. | |
| void | warning (const std::string &, const std::vector< std::string > &) const override |
| Display a tagged warning message. | |
| void | error (const std::string &, const std::vector< std::string > &) const override |
| Display a tagged error 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 | error_note (const std::string &, const std::vector< std::string > &) const override |
| Display a tagged note message associated with an error. | |
| 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. | |
| void | emit_fatal_root (const Error &) const override |
| Emit the root cause error in a fatal error chain. | |
Public Member Functions inherited from porytiles::UserDiagnostics | |
| virtual | ~UserDiagnostics ()=default |
| UserDiagnostics (gsl::not_null< const TextFormatter * > format) | |
| void | remark (const std::string &tag, const std::string &msg) const |
| Convenience overload for single line messages. | |
| template<typename FirstParam , typename... RestParams> requires ( !std::is_same_v<std::decay_t<FirstParam>, std::vector<FormatParam>> && std::is_constructible_v<FormatParam, FirstParam> && (std::is_constructible_v<FormatParam, RestParams> && ...)) | |
| void | remark (const std::string &tag, const std::string &format_str, FirstParam &&first, RestParams &&...rest) const |
| Variadic template overload for formatted remark messages. | |
| void | warning (const std::string &tag, const std::string &msg) const |
| Convenience overload for single line messages. | |
| template<typename FirstParam , typename... RestParams> requires ( !std::is_same_v<std::decay_t<FirstParam>, std::vector<FormatParam>> && std::is_constructible_v<FormatParam, FirstParam> && (std::is_constructible_v<FormatParam, RestParams> && ...)) | |
| void | warning (const std::string &tag, const std::string &format_str, FirstParam &&first, RestParams &&...rest) const |
| Variadic template overload for formatted warning messages. | |
| void | error (const std::string &tag, const std::string &msg) const |
| Convenience overload for single line messages. | |
| template<typename FirstParam , typename... RestParams> requires ( !std::is_same_v<std::decay_t<FirstParam>, std::vector<FormatParam>> && std::is_constructible_v<FormatParam, FirstParam> && (std::is_constructible_v<FormatParam, RestParams> && ...)) | |
| void | error (const std::string &tag, const std::string &format_str, FirstParam &&first, RestParams &&...rest) const |
| Variadic template overload for formatted error messages. | |
| void | remark_note (const std::string &tag, const std::string &msg) const |
| Convenience overload for single line messages. | |
| template<typename FirstParam , typename... RestParams> requires ( !std::is_same_v<std::decay_t<FirstParam>, std::vector<FormatParam>> && std::is_constructible_v<FormatParam, FirstParam> && (std::is_constructible_v<FormatParam, RestParams> && ...)) | |
| void | remark_note (const std::string &tag, const std::string &format_str, FirstParam &&first, RestParams &&...rest) const |
| Variadic template overload for formatted remark note messages. | |
| void | warning_note (const std::string &tag, const std::string &msg) const |
| Convenience overload for single line messages. | |
| template<typename FirstParam , typename... RestParams> requires ( !std::is_same_v<std::decay_t<FirstParam>, std::vector<FormatParam>> && std::is_constructible_v<FormatParam, FirstParam> && (std::is_constructible_v<FormatParam, RestParams> && ...)) | |
| void | warning_note (const std::string &tag, const std::string &format_str, FirstParam &&first, RestParams &&...rest) const |
| Variadic template overload for formatted warning note messages. | |
| void | error_note (const std::string &tag, const std::string &msg) const |
| Convenience overload for single line messages. | |
| template<typename FirstParam , typename... RestParams> requires ( !std::is_same_v<std::decay_t<FirstParam>, std::vector<FormatParam>> && std::is_constructible_v<FormatParam, FirstParam> && (std::is_constructible_v<FormatParam, RestParams> && ...)) | |
| void | error_note (const std::string &tag, const std::string &format_str, FirstParam &&first, RestParams &&...rest) const |
| Variadic template overload for formatted error note messages. | |
| template<typename T , typename E > | |
| void | fatal (const ChainableResult< T, E > &result) const |
| Display a fatal error with complete error chain visualization. | |
| const TextFormatter & | formatter () const |
Silent diagnostics implementation that suppresses all output.
NullUserDiagnostics implements all UserDiagnostics methods as no-ops, producing no output whatsoever. This is useful in contexts where diagnostic output would be inappropriate, such as shell completion scripts that must only output completion candidates.
Shell completion routines call helper commands that parse project files and produce completions. Any stderr output (warnings, errors, etc.) would corrupt the completion results and break the shell's tab-completion functionality.
Definition at line 25 of file null_user_diagnostics.hpp.
|
inlineexplicit |
Definition at line 27 of file null_user_diagnostics.hpp.
|
inlineoverridevirtual |
Emit the proximate (immediate) error in a fatal error chain.
Virtual method for displaying the most immediate error in a fatal error chain. This is typically the first error encountered and is displayed with the highest visual prominence.
| err | The proximate error to display |
Implements porytiles::UserDiagnostics.
Definition at line 59 of file null_user_diagnostics.hpp.
|
inlineoverridevirtual |
Emit the root cause error in a fatal error chain.
Virtual method for displaying the root cause error in a fatal error chain. This represents the original underlying cause of the failure and is typically displayed as the final item in the error hierarchy.
| err | The root cause error to display |
Implements porytiles::UserDiagnostics.
Definition at line 69 of file null_user_diagnostics.hpp.
|
inlineoverridevirtual |
Emit an intermediate step error in a fatal error chain.
Virtual method for displaying intermediate errors in a fatal error chain. These are errors that occurred between the proximate and root causes, typically displayed with tree-like formatting to show the error hierarchy.
| err | The step error to display |
Implements porytiles::UserDiagnostics.
Definition at line 64 of file null_user_diagnostics.hpp.
|
inlineoverridevirtual |
Display a tagged error message.
Errors indicate serious issues that require attention but don't necessarily cause immediate failure of the current operation. They include a categorization tag to help users understand and/or filter the type of error being reported.
Implementations typically format the first line with an "error:" prefix and subsequent lines with appropriate indentation.
| tag | Categorization tag for the error |
| lines | Vector of strings representing each line of the error |
Implements porytiles::UserDiagnostics.
Definition at line 39 of file null_user_diagnostics.hpp.
|
inlineoverridevirtual |
Display a tagged note message associated with an error.
Notes are informational messages that further clarify a parent diagnostic. This method is specifically for notes that follow an error diagnostic, enabling proper filtering - when an error is filtered out, its associated notes can also be suppressed.
Implementations typically format the first line with a "note:" prefix and subsequent lines with appropriate indentation. All note types use identical styling regardless of parent diagnostic type.
| tag | Categorization tag for the note (should match the parent error's tag) |
| lines | Vector of strings representing each line of the message |
Implements porytiles::UserDiagnostics.
Definition at line 54 of file null_user_diagnostics.hpp.
|
inlineoverridevirtual |
Display a tagged remark message.
Remarks are the lowest severity diagnostic level, used for communicating internal compiler mechanisms or decisions that may be of interest to users. Unlike notes (which clarify other remarks/warnings/errors), remarks are standalone informational messages about compiler behavior such as optimization decisions, tile assignment choices, or palette allocation strategies.
Implementations typically format the first line with a "remark:" prefix and the tag, with subsequent lines appropriately indented.
| tag | Categorization tag for the remark |
| lines | Vector of strings representing each line of the message |
Implements porytiles::UserDiagnostics.
Definition at line 29 of file null_user_diagnostics.hpp.
|
inlineoverridevirtual |
Display a tagged note message associated with a remark.
Notes are informational messages that further clarify a parent diagnostic. This method is specifically for notes that follow a remark diagnostic, enabling proper filtering - when a remark is filtered out, its associated notes can also be suppressed.
Implementations typically format the first line with a "note:" prefix and subsequent lines with appropriate indentation. All note types use identical styling regardless of parent diagnostic type.
| tag | Categorization tag for the note (should match the parent remark's tag) |
| lines | Vector of strings representing each line of the message |
Implements porytiles::UserDiagnostics.
Definition at line 44 of file null_user_diagnostics.hpp.
|
inlineoverridevirtual |
Display a tagged warning message.
Warnings indicate non-fatal issues that users should be aware of. They include a categorization tag to help users understand and/or filter the type of warning being reported.
Implementations typically format the first line with a "warning:" prefix and the tag, with subsequent lines appropriately indented.
| tag | Categorization tag for the warning |
| lines | Vector of strings representing each line of the warning |
Implements porytiles::UserDiagnostics.
Definition at line 34 of file null_user_diagnostics.hpp.
|
inlineoverridevirtual |
Display a tagged note message associated with a warning.
Notes are informational messages that further clarify a parent diagnostic. This method is specifically for notes that follow a warning diagnostic, enabling proper filtering - when a warning is filtered out, its associated notes can also be suppressed.
Implementations typically format the first line with a "note:" prefix and subsequent lines with appropriate indentation. All note types use identical styling regardless of parent diagnostic type.
| tag | Categorization tag for the note (should match the parent warning's tag) |
| lines | Vector of strings representing each line of the message |
Implements porytiles::UserDiagnostics.
Definition at line 49 of file null_user_diagnostics.hpp.