mirror of
https://github.com/YosysHQ/yosys
synced 2025-11-06 06:16:04 +00:00
Merge 6da26921d8 into 1598771a37
This commit is contained in:
commit
9f08ea13ef
3 changed files with 27 additions and 3 deletions
|
|
@ -354,6 +354,21 @@ static void log_error_with_prefix(std::string_view prefix, std::string str)
|
|||
|
||||
log_check_expected();
|
||||
|
||||
int lineno = 1;
|
||||
if ( !log_line_number.empty() ) {
|
||||
log("Error while executing script:\n\t");
|
||||
log( log_line_number.begin()->c_str() );
|
||||
log("\n");
|
||||
log_line_number.erase(log_line_number.begin());
|
||||
log("---------------------------------\n");
|
||||
for(const std::string& script_line : log_line_number) {
|
||||
const char* pfx = (lineno == log_line_number.size()) ? "-->" : " ";
|
||||
log("%s%d %s\n",pfx,lineno++,script_line.c_str());
|
||||
}
|
||||
log("---------------------------------\n");
|
||||
}
|
||||
|
||||
|
||||
if (log_error_atexit)
|
||||
log_error_atexit();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue