summary refs log tree commit diff stats
path: root/compiler/docgen2.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-06-24 02:34:11 +0200
committerAraq <rumpf_a@web.de>2012-06-24 02:34:11 +0200
commit869a5aa90d91fae1e522b69cf5bf4cc330d54a23 (patch)
tree099348ab1a39712040566131725c612b2a12e116 /compiler/docgen2.nim
parent2d8138768af447742e1e2a6058bdb4d9273600c3 (diff)
downloadNim-869a5aa90d91fae1e522b69cf5bf4cc330d54a23.tar.gz
doc2 improvements
Diffstat (limited to 'compiler/docgen2.nim')
-rw-r--r--compiler/docgen2.nim8
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/docgen2.nim b/compiler/docgen2.nim
index a7a84641e..ba3f5d4ca 100644
--- a/compiler/docgen2.nim
+++ b/compiler/docgen2.nim
@@ -22,8 +22,12 @@ type
 
 proc close(p: PPassContext, n: PNode): PNode =
   var g = PGen(p)
-  writeOutput(g.doc, g.filename, HtmlExt)
-  generateIndex(g.doc)
+  let useWarning = sfMainModule notin g.module.flags
+  writeOutput(g.doc, g.filename, HtmlExt, useWarning)
+  try:
+    generateIndex(g.doc)
+  except EIO:
+    nil
 
 proc processNode(c: PPassContext, n: PNode): PNode = 
   result = n