-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
api: exceptions are used instead of status codes
* Make refextract more idiomatic, raising exceptions instead of having (result, error) return values in functions. * INCOMPATIBLE FullTextNotAvailable is renamed to FullTextNotAvailableError. * NEW There are two new exceptions, UnknownDocumentTypeError when the file/URL is not a PDF or plain text and GarbageFullTextError when the PDF fulltext extraction gives garbage. * The exception raised when 'pdftotext' is not found is now FileNotFoundError instead of Exception. * Fix the utterly broken error handling in extract_references_from_url. * Add tests for UnknownDocumentTypeError and FullTextNotAvailableError. Signed-off-by: Micha Moskovic <michamos@gmail.com>
- Loading branch information
Showing
6 changed files
with
75 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters