Takeshi Komiya avatar Takeshi Komiya committed 9b9395f

blockdiag: Add blockdiag_debug option

Comments (0)

Files changed (6)

actdiag/sphinxcontrib/actdiag.py

 import re
 import os
 import codecs
+import traceback
 try:
     from hashlib import sha1 as sha
 except ImportError:
         draw = drawer.DiagramDraw(format, screen, filename,
                                   fontmap=fontmap, antialias=antialias)
     except Exception, e:
+        if self.builder.config.actdiag_debug:
+            traceback.print_exc()
+
         raise ActdiagError('actdiag error:\n%s\n' % e)
 
     return draw
     app.add_config_value('actdiag_fontpath', None, 'html')
     app.add_config_value('actdiag_fontmap', None, 'html')
     app.add_config_value('actdiag_antialias', False, 'html')
+    app.add_config_value('actdiag_debug', False, 'html')
     app.add_config_value('actdiag_html_image_format', 'PNG', 'html')
     app.add_config_value('actdiag_tex_image_format', 'PNG', 'html')
     app.connect("doctree-resolved", on_doctree_resolved)

blockdiag/sphinxcontrib/blockdiag.py

 import re
 import os
 import codecs
+import traceback
 try:
     from hashlib import sha1 as sha
 except ImportError:
                                   fontmap=fontmap, antialias=antialias)
 
     except Exception, e:
+        if self.builder.config.blockdiag_debug:
+            traceback.print_exc()
+
         raise BlockdiagError('blockdiag error:\n%s\n' % e)
 
     return draw
     app.add_config_value('blockdiag_fontpath', None, 'html')
     app.add_config_value('blockdiag_fontmap', None, 'html')
     app.add_config_value('blockdiag_antialias', False, 'html')
+    app.add_config_value('blockdiag_debug', False, 'html')
     app.add_config_value('blockdiag_html_image_format', 'PNG', 'html')
     app.add_config_value('blockdiag_tex_image_format', 'PNG', 'html')
     app.connect("doctree-resolved", on_doctree_resolved)

nwdiag/sphinxcontrib/nwdiag.py

 import posixpath
 import os
 import codecs
+import traceback
 try:
     from hashlib import sha1 as sha
 except ImportError:
         draw = drawer.DiagramDraw(format, screen, filename,
                                   fontmap=fontmap, antialias=antialias)
     except Exception, e:
+        if self.builder.config.nwdiag_debug:
+            traceback.print_exc()
+
         raise NwdiagError('nwdiag error:\n%s\n' % e)
 
     return draw
     app.add_config_value('nwdiag_fontpath', None, 'html')
     app.add_config_value('nwdiag_fontmap', None, 'html')
     app.add_config_value('nwdiag_antialias', False, 'html')
+    app.add_config_value('nwdiag_debug', False, 'html')
     app.add_config_value('nwdiag_html_image_format', 'PNG', 'html')
     app.add_config_value('nwdiag_tex_image_format', 'PNG', 'html')
     app.connect("doctree-resolved", on_doctree_resolved)

nwdiag/sphinxcontrib/packetdiag.py

 import posixpath
 import os
 import codecs
+import traceback
 try:
     from hashlib import sha1 as sha
 except ImportError:
         draw = drawer.DiagramDraw(format, screen, filename,
                                   fontmap=fontmap, antialias=antialias)
     except Exception, e:
+        if self.builder.config.packetdiag_debug:
+            traceback.print_exc()
+
         raise PacketdiagError('packetdiag error:\n%s\n' % e)
 
     return draw
     app.add_config_value('packetdiag_fontpath', None, 'html')
     app.add_config_value('packetdiag_fontmap', None, 'html')
     app.add_config_value('packetdiag_antialias', False, 'html')
+    app.add_config_value('packetdiag_debug', False, 'html')
     app.add_config_value('packetdiag_html_image_format', 'PNG', 'html')
     app.add_config_value('packetdiag_tex_image_format', 'PNG', 'html')
     app.connect("doctree-resolved", on_doctree_resolved)

nwdiag/sphinxcontrib/rackdiag.py

 import posixpath
 import os
 import codecs
+import traceback
 try:
     from hashlib import sha1 as sha
 except ImportError:
         draw = drawer.DiagramDraw(format, screen, filename,
                                   fontmap=fontmap, antialias=antialias)
     except Exception, e:
+        if self.builder.config.rackdiag_debug:
+            traceback.print_exc()
+
         raise RackdiagError('rackdiag error:\n%s\n' % e)
 
     return draw
     app.add_config_value('rackdiag_fontpath', None, 'html')
     app.add_config_value('rackdiag_fontmap', None, 'html')
     app.add_config_value('rackdiag_antialias', False, 'html')
+    app.add_config_value('rackdiag_debug', False, 'html')
     app.add_config_value('rackdiag_html_image_format', 'PNG', 'html')
     app.add_config_value('rackdiag_tex_image_format', 'PNG', 'html')
     app.connect("doctree-resolved", on_doctree_resolved)

seqdiag/sphinxcontrib/seqdiag.py

 import posixpath
 import os
 import codecs
+import traceback
 try:
     from hashlib import sha1 as sha
 except ImportError:
         draw = drawer.DiagramDraw(format, screen, filename,
                                   fontmap=fontmap, antialias=antialias)
     except Exception, e:
+        if self.builder.config.seqdiag_debug:
+            traceback.print_exc()
+
         raise SeqdiagError('seqdiag error:\n%s\n' % e)
 
     return draw
     app.add_config_value('seqdiag_fontpath', None, 'html')
     app.add_config_value('seqdiag_fontmap', None, 'html')
     app.add_config_value('seqdiag_antialias', False, 'html')
+    app.add_config_value('seqdiag_debug', False, 'html')
     app.add_config_value('seqdiag_html_image_format', 'PNG', 'html')
     app.add_config_value('seqdiag_tex_image_format', 'PNG', 'html')
     app.connect("doctree-resolved", on_doctree_resolved)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.