3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-06 06:03:23 +00:00

Store command history when terminating with an error

This commit is contained in:
Clifford Wolf 2017-06-20 04:41:58 +02:00
parent f6421c83a2
commit c0ca99483c
3 changed files with 31 additions and 17 deletions

View file

@ -52,6 +52,7 @@ bool log_cmd_error_throw = false;
bool log_quiet_warnings = false;
int log_verbose_level;
string log_last_error;
void (*log_error_atexit)() = NULL;
vector<int> header_count;
pool<RTLIL::IdString> log_id_cache;
@ -244,6 +245,9 @@ void logv_error(const char *format, va_list ap)
log("ERROR: %s", log_last_error.c_str());
log_flush();
if (log_error_atexit)
log_error_atexit();
#ifdef EMSCRIPTEN
log_files = backup_log_files;
throw 0;