summaryrefslogtreecommitdiffstats
path: root/src/message.cpp
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2019-11-22 13:56:50 (GMT)
committeralbert-github <albert.tests@gmail.com>2019-11-22 13:56:50 (GMT)
commit146bec22e9ff91e8274becd719149f7ab9c7cfb9 (patch)
treecf306ab8fce7c29a7fc8db53f0a16d55120a2507 /src/message.cpp
parente7d47ec23ba1b109754d6e47b1eb4d341efc3b36 (diff)
downloadDoxygen-146bec22e9ff91e8274becd719149f7ab9c7cfb9.zip
Doxygen-146bec22e9ff91e8274becd719149f7ab9c7cfb9.tar.gz
Doxygen-146bec22e9ff91e8274becd719149f7ab9c7cfb9.tar.bz2
Better termination message
In case a `WARN_LOGFILE` is used it in this file no clear whether doxygen finished correctly or exited beforehand in case a fatal error. Now a 'Exiting...' is also given in the warning log file in case an error is a fatal error.
Diffstat (limited to 'src/message.cpp')
-rw-r--r--src/message.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/message.cpp b/src/message.cpp
index ddf757a..4b430da 100644
--- a/src/message.cpp
+++ b/src/message.cpp
@@ -251,6 +251,34 @@ extern void err_full(const char *file,int line,const char *fmt, ...)
va_end(args);
}
+void term(const int exitVal, const char *fmt, ...)
+{
+ va_list args;
+ va_start(args, fmt);
+ vfprintf(warnFile, (QCString(error_str) + fmt).data(), args);
+ va_end(args);
+ if (warnFile != stderr)
+ {
+ for (int i = 0; i < strlen(error_str); i++) fprintf(warnFile, " ");
+ fprintf(warnFile, "%s\n", "Exiting...");
+ }
+ exit(exitVal);
+}
+
+extern void term_full(const int exitVal, const char *file,int line,const char *fmt, ...)
+{
+ va_list args;
+ va_start(args, fmt);
+ do_warn(TRUE, file, line, error_str, fmt, args);
+ va_end(args);
+ if (warnFile != stderr)
+ {
+ for (int i = 0; i < strlen(error_str); i++) fprintf(warnFile, " ");
+ fprintf(warnFile, "%s\n", "Exiting...");
+ }
+ exit(exitVal);
+}
+
void printlex(int dbg, bool enter, const char *lexName, const char *fileName)
{
const char *enter_txt = "entering";