Skip to content

Commit d2b4e73

Browse files
authored
Merge pull request #75 from bomboradata/detailed-errors
Make `BlockifyError`s a bit more descriptive
2 parents 6ff34e9 + c145f40 commit d2b4e73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dragnet/blocks.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -846,10 +846,10 @@ class Blockifier(object):
846846
etree.HTMLParser(recover=True, encoding=encoding,
847847
remove_comments=True, remove_pis=True))
848848
except:
849-
raise BlockifyError
849+
raise BlockifyError, 'Could not blockify HTML'
850850
if html is None:
851851
# lxml sometimes doesn't raise an error but returns None
852-
raise BlockifyError
852+
raise BlockifyError, 'Could not blockify HTML'
853853

854854
blocks = Blockifier.blocks_from_tree(html, pb, do_css, do_readability)
855855

0 commit comments

Comments
 (0)