Hello,

I had a look at the code that invokes /usr/bin/dot, and found that there
are various other places where doxygen calls an external process but
doesn't stop execution when that process fails.

The attached patch adds exit(1) after each such failure that I could
find.  I'm not suggesting this patch be applied: it would break user's
expectations of doxygen behaviour outside of Debian package builds.
It's just a starting point for what might need to be done to fix this.

Note that the doxygen configuration setting WARN_AS_ERROR doesn't help.

-- 
Sean Whitton
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index a3a3d2a..0689726 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -11440,9 +11440,15 @@ void generateOutput()
     Htags::useHtags = TRUE;
     QCString htmldir = Config_getString("HTML_OUTPUT");
     if (!Htags::execute(htmldir))
+    {
        err("USE_HTAGS is YES but htags(1) failed. \n");
+       exit(1)
+    }
     if (!Htags::loadFilemap(htmldir))
+    {
        err("htags(1) ended normally but failed to load the filemap. \n");
+       exit(1);
+    }
   }
 
   /**************************************************************************
@@ -11639,6 +11645,7 @@ void generateOutput()
     if (!RTFGenerator::preProcessFileInplace(Config_getString("RTF_OUTPUT"),"refman.rtf"))
     {
       err("An error occurred during post-processing the RTF files!\n");
+      exit(1);
     }
     g_s.end();
   }
@@ -11646,7 +11653,9 @@ void generateOutput()
   if (Config_getBool("HAVE_DOT"))
   {
     g_s.begin("Running dot...\n");
-    DotManager::instance()->run();
+    // error message is output by run()
+    if (!DotManager::instance()->run())
+      exit(1);
     g_s.end();
   }
 
@@ -11675,6 +11684,7 @@ void generateOutput()
 	if (portable_system(Config_getString("HHC_LOCATION"), "index.hhp", Debug::isFlagSet(Debug::ExtCmd)))
     {
       err("failed to run html help compiler on index.hhp\n");
+      exit(1);
     }
     portable_sysTimerStop();
     QDir::setCurrent(oldDir);
@@ -11695,6 +11705,7 @@ void generateOutput()
     if (portable_system(Config_getString("QHG_LOCATION"), args.data(), FALSE))
     {
       err("failed to run qhelpgenerator on index.qhp\n");
+      exit(1);
     }
     portable_sysTimerStop();
     QDir::setCurrent(oldDir);

Attachment: signature.asc
Description: PGP signature

Reply via email to