Module errors

Module errors 

Source
Expand description

Collect error reports and then write them out.

Structs§

Cache 🔒
Errors
IgnoreEntry 🔒

Statics§

ERRORS 🔒
LOG_ONCE 🔒
Error types that should be logged once when consolidating reports

Functions§

add_loaded_dlc_root
Record a DLC directory from the vanilla installation. label is what it should be called in the error reports.
add_loaded_mod_root
Record a secondary mod to be loaded before the one being validated. label is what it should be called in the error reports; ideally only a few characters long.
disable_ansi_colors
Disable color in the output.
emit_reports
Print all the stored reports to the error output. Set json if they should be printed as a JSON array. Otherwise they are printed in the default output format.
log
Store an error report to be emitted when emit_reports is called.
pointed_msg_expansion 🔒
Expand Vec<PointedMessage>. That is; for each PointedMessage, follow its location’s link until such link is no longer available, adding a newly created PointedMessage to the returned Vec for each linked location.
register_ignore_filter
set_output_style
Override the default OutputStyle. (Controls ansi colors)
set_predicate 🔒
Configure the error reporter to only show errors that match this FilterRule.
set_show_loaded_mods
Configure the error reporter to show errors that are in extra loaded mods. Normally those are filtered out, to only show errors that involve the mod’s code.
set_show_vanilla
Configure the error reporter to show errors that are in the base game code. Normally those are filtered out, to only show errors that involve the mod’s code.
store_source_file
take_reports
Extract the stored reports, sort them, and return them as a hashmap with the occurrences for each instance of metadata split out.
will_maybe_log
Tests whether the report might be printed. If false, the report will definitely not be printed.