rename Report virtuals to warnMsg etc
This reverts commit 2ed1c2c06b.
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
2ed1c2c06b
commit
d90bf7d93b
|
|
@ -61,9 +61,9 @@ public:
|
||||||
void report(std::string_view fmt,
|
void report(std::string_view fmt,
|
||||||
Args &&...args)
|
Args &&...args)
|
||||||
{
|
{
|
||||||
report(sta::vformat(fmt, sta::make_format_args(args...)));
|
reportMsg(sta::vformat(fmt, sta::make_format_args(args...)));
|
||||||
}
|
}
|
||||||
virtual void report(const std::string &formatted_msg)
|
virtual void reportMsg(const std::string &formatted_msg)
|
||||||
{
|
{
|
||||||
reportLine(formatted_msg);
|
reportLine(formatted_msg);
|
||||||
}
|
}
|
||||||
|
|
@ -76,12 +76,11 @@ public:
|
||||||
std::string_view fmt,
|
std::string_view fmt,
|
||||||
Args &&...args)
|
Args &&...args)
|
||||||
{
|
{
|
||||||
if (!isSuppressed(id)) {
|
if (!isSuppressed(id))
|
||||||
warn(id, sta::vformat(fmt, sta::make_format_args(args...)));
|
warnMsg(id, sta::vformat(fmt, sta::make_format_args(args...)));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
virtual void warn(int id,
|
virtual void warnMsg(int id,
|
||||||
const std::string &formatted_msg) {
|
const std::string &formatted_msg) {
|
||||||
reportLine(sta::format("Warning {}: {}", id, formatted_msg));
|
reportLine(sta::format("Warning {}: {}", id, formatted_msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -94,15 +93,15 @@ public:
|
||||||
Args &&...args)
|
Args &&...args)
|
||||||
{
|
{
|
||||||
if (!isSuppressed(id)) {
|
if (!isSuppressed(id)) {
|
||||||
fileWarn(id, filename, line,
|
fileWarnMsg(id, filename, line,
|
||||||
sta::vformat(fmt, sta::make_format_args(args...)));
|
sta::vformat(fmt, sta::make_format_args(args...)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
virtual void
|
virtual void
|
||||||
fileWarn(int id,
|
fileWarnMsg(int id,
|
||||||
std::string_view filename,
|
std::string_view filename,
|
||||||
int line,
|
int line,
|
||||||
const std::string &formatted_msg) {
|
const std::string &formatted_msg) {
|
||||||
reportLine(sta::format("Warning {}: {} line {}, {}",
|
reportLine(sta::format("Warning {}: {} line {}, {}",
|
||||||
id, filename, line, formatted_msg));
|
id, filename, line, formatted_msg));
|
||||||
}
|
}
|
||||||
|
|
@ -112,10 +111,10 @@ public:
|
||||||
std::string_view fmt,
|
std::string_view fmt,
|
||||||
Args &&...args)
|
Args &&...args)
|
||||||
{
|
{
|
||||||
error(id, sta::vformat(fmt, sta::make_format_args(args...)));
|
errorMsg(id, sta::vformat(fmt, sta::make_format_args(args...)));
|
||||||
}
|
}
|
||||||
virtual void error(int id,
|
virtual void errorMsg(int id,
|
||||||
const std::string &formatted_msg)
|
const std::string &formatted_msg)
|
||||||
{
|
{
|
||||||
reportThrowExceptionMsg(sta::format("{} {}", id, formatted_msg), isSuppressed(id));
|
reportThrowExceptionMsg(sta::format("{} {}", id, formatted_msg), isSuppressed(id));
|
||||||
}
|
}
|
||||||
|
|
@ -127,13 +126,13 @@ public:
|
||||||
std::string_view fmt,
|
std::string_view fmt,
|
||||||
Args &&...args)
|
Args &&...args)
|
||||||
{
|
{
|
||||||
fileError(id, filename, line,
|
fileErrorMsg(id, filename, line,
|
||||||
sta::vformat(fmt, sta::make_format_args(args...)));
|
sta::vformat(fmt, sta::make_format_args(args...)));
|
||||||
}
|
}
|
||||||
virtual void fileError(int id,
|
virtual void fileErrorMsg(int id,
|
||||||
std::string_view filename,
|
std::string_view filename,
|
||||||
int line,
|
int line,
|
||||||
const std::string &formatted_msg)
|
const std::string &formatted_msg)
|
||||||
{
|
{
|
||||||
reportThrowExceptionMsg(sta::format("{} {} line {}, {}",
|
reportThrowExceptionMsg(sta::format("{} {} line {}, {}",
|
||||||
id, filename, line, formatted_msg),
|
id, filename, line, formatted_msg),
|
||||||
|
|
@ -148,10 +147,10 @@ public:
|
||||||
std::string_view fmt,
|
std::string_view fmt,
|
||||||
Args &&...args)
|
Args &&...args)
|
||||||
{
|
{
|
||||||
critical(id, sta::vformat(fmt, sta::make_format_args(args...)));
|
criticalMsg(id, sta::vformat(fmt, sta::make_format_args(args...)));
|
||||||
}
|
}
|
||||||
virtual void critical(int id,
|
virtual void criticalMsg(int id,
|
||||||
const std::string &formatted_msg)
|
const std::string &formatted_msg)
|
||||||
{
|
{
|
||||||
reportLine(sta::format("Critical {}: {}", id, formatted_msg));
|
reportLine(sta::format("Critical {}: {}", id, formatted_msg));
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
@ -164,13 +163,13 @@ public:
|
||||||
std::string_view fmt,
|
std::string_view fmt,
|
||||||
Args &&...args)
|
Args &&...args)
|
||||||
{
|
{
|
||||||
fileCritical(id, filename, line,
|
fileCriticalMsg(id, filename, line,
|
||||||
sta::vformat(fmt, sta::make_format_args(args...)));
|
sta::vformat(fmt, sta::make_format_args(args...)));
|
||||||
}
|
}
|
||||||
virtual void fileCritical(int id,
|
virtual void fileCriticalMsg(int id,
|
||||||
std::string_view filename,
|
std::string_view filename,
|
||||||
int line,
|
int line,
|
||||||
const std::string &formatted_msg)
|
const std::string &formatted_msg)
|
||||||
{
|
{
|
||||||
reportLine(sta::format("Critical {}: {} line {}, {}", id, filename, line,
|
reportLine(sta::format("Critical {}: {} line {}, {}", id, filename, line,
|
||||||
formatted_msg));
|
formatted_msg));
|
||||||
|
|
|
||||||
|
|
@ -1057,14 +1057,14 @@ ReportPath::pathEndpoint(const PathEnd *end) const
|
||||||
void
|
void
|
||||||
ReportPath::reportJsonHeader() const
|
ReportPath::reportJsonHeader() const
|
||||||
{
|
{
|
||||||
report_->report("{\"checks\": [");
|
report_->report("{{\"checks\": [");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ReportPath::reportJsonFooter() const
|
ReportPath::reportJsonFooter() const
|
||||||
{
|
{
|
||||||
report_->report("]");
|
report_->report("]");
|
||||||
report_->report("}");
|
report_->report("}}");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue