mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Improve exception when parsing a Python file fails.
This commit is contained in:
parent
cc89093777
commit
542ca21837
@ -100,7 +100,7 @@ class ModuleAnalyzer(object):
|
||||
self.tags = parser.definitions
|
||||
self.tagorder = parser.deforders
|
||||
except Exception as exc:
|
||||
raise PycodeError('parsing failed: %r' % exc)
|
||||
raise PycodeError('parsing %r failed: %r' % (self.srcname, exc))
|
||||
|
||||
def find_attr_docs(self):
|
||||
# type: () -> Dict[Tuple[unicode, unicode], List[unicode]]
|
||||
|
Loading…
Reference in New Issue
Block a user