diff options
author | Clifford Wolf <clifford@clifford.at> | 2017-06-20 04:41:58 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2017-06-20 04:41:58 +0200 |
commit | c0ca99483c1c0966305ced16a9a7e00e4c5ecce0 (patch) | |
tree | 227e4aa7ff05c7d17db66d649b0783476e083fa7 /kernel/log.cc | |
parent | f6421c83a28f0db29fd80ad2b2fbc59f6b1ccace (diff) | |
download | yosys-c0ca99483c1c0966305ced16a9a7e00e4c5ecce0.tar.gz yosys-c0ca99483c1c0966305ced16a9a7e00e4c5ecce0.tar.bz2 yosys-c0ca99483c1c0966305ced16a9a7e00e4c5ecce0.zip |
Store command history when terminating with an error
Diffstat (limited to 'kernel/log.cc')
-rw-r--r-- | kernel/log.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/log.cc b/kernel/log.cc index c7240d540..3768922cd 100644 --- a/kernel/log.cc +++ b/kernel/log.cc @@ -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; |