aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/log.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/log.cc')
-rw-r--r--kernel/log.cc4
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;