mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-22 22:03:40 +00:00
Added log_cmd_error_expection
This commit is contained in:
parent
7661ded8dd
commit
d878fcbdc7
4 changed files with 7 additions and 8 deletions
|
@ -141,9 +141,9 @@ static void run_frontend(std::string filename, std::string command, RTLIL::Desig
|
|||
Pass::call(design, command);
|
||||
}
|
||||
}
|
||||
catch (...) {
|
||||
catch (log_cmd_error_expection) {
|
||||
Frontend::current_script_file = backup_script_file;
|
||||
std::rethrow_exception(std::current_exception());
|
||||
throw log_cmd_error_expection();
|
||||
}
|
||||
|
||||
Frontend::current_script_file = backup_script_file;
|
||||
|
@ -329,7 +329,7 @@ static void shell(RTLIL::Design *design)
|
|||
try {
|
||||
assert(design->selection_stack.size() == 1);
|
||||
Pass::call(design, command);
|
||||
} catch (int) {
|
||||
} catch (log_cmd_error_expection) {
|
||||
while (design->selection_stack.size() > 1)
|
||||
design->selection_stack.pop_back();
|
||||
log_reset_stack();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue