aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/utils.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-01-01 20:27:53 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2013-01-01 20:27:53 +0100
commit1c256f7047051bf351ed5aedb95d8e705685a06b (patch)
treee507b073c6cb78f91e81f1b7bff86b8d8c8dbd94 /youtube_dl/utils.py
parenta34dd63bebf2140d7df7082c49857fc3b6dc410e (diff)
ExtractorError for errors during extraction
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r--youtube_dl/utils.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index e9336bcdd..91e180326 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -410,6 +410,17 @@ def encodeFilename(s):
else:
return s.encode(sys.getfilesystemencoding(), 'ignore')
+
+class ExtractorError(Exception):
+ """Error during info extraction."""
+ def __init__(self, msg, tb=None):
+ """ tb is the original traceback (so that it can be printed out) """
+ super(ExtractorError, self).__init__(msg)
+ if tb is None:
+ tb = sys.exc_info()[2]
+ self.traceback = tb
+
+
class DownloadError(Exception):
"""Download Error exception.