diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2018-06-21 17:44:18 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2018-06-21 17:44:18 +0200 |
commit | 54549d36e911aac8d0b0a2eea6074654c06c9717 (patch) | |
tree | bacd09c5c7637ed7ffc918f222b2ce50fef9d73d /common | |
parent | fcfb85e9dc7cc4a858c938692a8612cef3c9538b (diff) | |
download | nextpnr-54549d36e911aac8d0b0a2eea6074654c06c9717.tar.gz nextpnr-54549d36e911aac8d0b0a2eea6074654c06c9717.tar.bz2 nextpnr-54549d36e911aac8d0b0a2eea6074654c06c9717.zip |
log_error now trows exception, main is covering catch
Diffstat (limited to 'common')
-rw-r--r-- | common/log.cc | 6 | ||||
-rw-r--r-- | common/log.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/common/log.cc b/common/log.cc index b0cd802a..495f83b1 100644 --- a/common/log.cc +++ b/common/log.cc @@ -150,12 +150,8 @@ void logv_error(const char *format, va_list ap) #ifdef EMSCRIPTEN log_files = backup_log_files; - throw 0; -#elif defined(_MSC_VER) - _exit(EXIT_FAILURE); -#else - _Exit(EXIT_FAILURE); #endif + throw log_execution_error_exception(); } void log(const char *format, ...) diff --git a/common/log.h b/common/log.h index 381843b3..65b3f178 100644 --- a/common/log.h +++ b/common/log.h @@ -43,6 +43,10 @@ struct log_cmd_error_exception { }; +struct log_execution_error_exception +{ +}; + extern std::vector<FILE *> log_files; extern std::vector<std::ostream *> log_streams; extern FILE *log_errfile; |