mirror of https://github.com/YosysHQ/yosys.git
log: Never silence `log_cmd_error`
Add extra handling to arrange for `log_cmd_error` never being silenced by the command line `-v N` option. Similar path for `log_error` exists already.
This commit is contained in:
parent
8e1e2b9a39
commit
3e3515e7d9
|
@ -459,8 +459,21 @@ void log_cmd_error(const char *format, ...)
|
||||||
|
|
||||||
if (log_cmd_error_throw) {
|
if (log_cmd_error_throw) {
|
||||||
log_last_error = vstringf(format, ap);
|
log_last_error = vstringf(format, ap);
|
||||||
|
|
||||||
|
// Make sure the error message gets through any selective silencing
|
||||||
|
// of log output
|
||||||
|
bool pop_errfile = false;
|
||||||
|
if (log_errfile != NULL) {
|
||||||
|
log_files.push_back(log_errfile);
|
||||||
|
pop_errfile = true;
|
||||||
|
}
|
||||||
|
|
||||||
log("ERROR: %s", log_last_error.c_str());
|
log("ERROR: %s", log_last_error.c_str());
|
||||||
log_flush();
|
log_flush();
|
||||||
|
|
||||||
|
if (pop_errfile)
|
||||||
|
log_files.pop_back();
|
||||||
|
|
||||||
throw log_cmd_error_exception();
|
throw log_cmd_error_exception();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue