diff --git a/patacrep/encoding.py b/patacrep/encoding.py index 9f0018da..d38daf60 100644 --- a/patacrep/encoding.py +++ b/patacrep/encoding.py @@ -43,4 +43,4 @@ def detect_encoding(filename): finally: filehandler.close() - raise Exception('Not suitable encoding found for {}'.format(filename)) + raise UnicodeDecodeError('Not suitable encoding found for {}'.format(filename))