Show More
@@ -413,7 +413,7 b' class FunctionDoc(NumpyDocString):' | |||
|
413 | 413 | doc = inspect.getdoc(func) or '' |
|
414 | 414 | try: |
|
415 | 415 | NumpyDocString.__init__(self, doc) |
|
416 |
except ValueError |
|
|
416 | except ValueError as e: | |
|
417 | 417 | print '*'*78 |
|
418 | 418 | print "ERROR: '%s' while parsing `%s`" % (e, self._f) |
|
419 | 419 | print '*'*78 |
@@ -429,7 +429,7 b' class FunctionDoc(NumpyDocString):' | |||
|
429 | 429 | argspec = inspect.formatargspec(*argspec) |
|
430 | 430 | argspec = argspec.replace('*','\*') |
|
431 | 431 | signature = '%s%s' % (func_name, argspec) |
|
432 |
except TypeError |
|
|
432 | except TypeError as e: | |
|
433 | 433 | signature = '%s()' % func_name |
|
434 | 434 | self['Signature'] = signature |
|
435 | 435 |
@@ -36,7 +36,7 b' def make_link_node(rawtext, app, type, slug, options):' | |||
|
36 | 36 | raise AttributeError |
|
37 | 37 | if not base.endswith('/'): |
|
38 | 38 | base += '/' |
|
39 |
except AttributeError |
|
|
39 | except AttributeError as err: | |
|
40 | 40 | raise ValueError('github_project_url configuration value is not set (%s)' % str(err)) |
|
41 | 41 | |
|
42 | 42 | ref = base + type + '/' + slug + '/' |
@@ -133,7 +133,7 b' def ghcommit_role(name, rawtext, text, lineno, inliner, options={}, content=[]):' | |||
|
133 | 133 | raise AttributeError |
|
134 | 134 | if not base.endswith('/'): |
|
135 | 135 | base += '/' |
|
136 |
except AttributeError |
|
|
136 | except AttributeError as err: | |
|
137 | 137 | raise ValueError('github_project_url configuration value is not set (%s)' % str(err)) |
|
138 | 138 | |
|
139 | 139 | ref = base + text |
@@ -380,7 +380,7 b' def visit_inheritance_diagram(inner_func):' | |||
|
380 | 380 | def visitor(self, node): |
|
381 | 381 | try: |
|
382 | 382 | content = inner_func(self, node) |
|
383 |
except DotException |
|
|
383 | except DotException as e: | |
|
384 | 384 | # Insert the exception as a warning in the document |
|
385 | 385 | warning = self.document.reporter.warning(str(e), line=node.line) |
|
386 | 386 | warning.parent = node |
General Comments 0
You need to be logged in to leave comments.
Login now