mirror of https://github.com/YosysHQ/yosys.git
Merge pull request #4613 from povik/err-never-silence
log: Never silence `log_cmd_error`
This commit is contained in:
commit
e46cc57cc4
|
@ -459,8 +459,21 @@ void log_cmd_error(const char *format, ...)
|
|||
|
||||
if (log_cmd_error_throw) {
|
||||
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_flush();
|
||||
|
||||
if (pop_errfile)
|
||||
log_files.pop_back();
|
||||
|
||||
throw log_cmd_error_exception();
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
trap 'echo "ERROR in logger_cmd_error.sh" >&2; exit 1' ERR
|
||||
|
||||
(../../yosys -v 3 -C <<EOF
|
||||
yosys -import
|
||||
hierarchy -top nonexistent
|
||||
EOF
|
||||
) 2>&1 | grep -F "ERROR: Module \`nonexistent' not found!" > /dev/null
|
Loading…
Reference in New Issue