aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-11-24 19:16:23 +0000
committerNick Mathewson <nickm@torproject.org>2008-11-24 19:16:23 +0000
commit714263e8f1a59030f0c32adcbc37bde408f1af46 (patch)
treede2953b6e70d93f6f6b6fc1b78baed58c59a19b8
parented31b420ff800e93f3d14312b5041af42b265836 (diff)
downloadanonbib-714263e8f1a59030f0c32adcbc37bde408f1af46.tar.gz
Give more useful error message when author parsing fails
svn:r302
-rw-r--r--BibTeX.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/BibTeX.py b/BibTeX.py
index 739fad6..41843bc 100644
--- a/BibTeX.py
+++ b/BibTeX.py
@@ -860,7 +860,15 @@ class FileIter:
self.lineno += 1
return self._next()
+
def parseAuthor(s):
+ try:
+ return _parseAuthor(s)
+ except:
+ print >>sys.stderr, "Internal error while parsing author %r"%s
+ raise
+
+def _parseAuthor(s):
"""Take an author string and return a list of ParsedAuthor."""
items = []