ajenhl / tacl

Tool for performing basic text analysis on the CBETA corpus
GNU General Public License v3.0
30 stars 9 forks source link

Add better error handling #33

Open ajenhl opened 9 years ago

ajenhl commented 9 years ago

Currently there are exceptions that are not handled (MemoryError with database operations, FileExistsError with corpus stripping) and should be. Also, unanticipated errors should be caught and handled generically (log exception name and message, at least).

ajenhl commented 8 years ago

When a database is missing entries for texts in the supplied corpus (as referenced in the supplied catalogue), a warning log message is emitted, but it should really raise an exception, since that is likely to happen later (unless the text is unlabelled in the catalogue).