mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-06 19:21:23 +00:00
Make log_cmd_error() use variadic templates.
This commit is contained in:
parent
5951d9d303
commit
7f45715fec
2 changed files with 11 additions and 9 deletions
|
@ -386,13 +386,10 @@ void log_formatted_error(std::string str)
|
|||
log_error_with_prefix("ERROR: ", std::move(str));
|
||||
}
|
||||
|
||||
void log_cmd_error(const char *format, ...)
|
||||
void log_formatted_cmd_error(std::string str)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
|
||||
if (log_cmd_error_throw) {
|
||||
log_last_error = vstringf(format, ap);
|
||||
log_last_error = str;
|
||||
|
||||
// Make sure the error message gets through any selective silencing
|
||||
// of log output
|
||||
|
@ -402,7 +399,7 @@ void log_cmd_error(const char *format, ...)
|
|||
pop_errfile = true;
|
||||
}
|
||||
|
||||
log("ERROR: %s", log_last_error.c_str());
|
||||
log("ERROR: %s", log_last_error);
|
||||
log_flush();
|
||||
|
||||
if (pop_errfile)
|
||||
|
@ -411,7 +408,7 @@ void log_cmd_error(const char *format, ...)
|
|||
throw log_cmd_error_exception();
|
||||
}
|
||||
|
||||
log_formatted_error(vstringf(format, ap));
|
||||
log_formatted_error(str);
|
||||
}
|
||||
|
||||
void log_spacer()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue