summaryrefslogtreecommitdiff
path: root/pdfrw/errors.py
diff options
context:
space:
mode:
Diffstat (limited to 'pdfrw/errors.py')
-rw-r--r--pdfrw/errors.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/pdfrw/errors.py b/pdfrw/errors.py
index 4759656..263cd4d 100644
--- a/pdfrw/errors.py
+++ b/pdfrw/errors.py
@@ -1,5 +1,5 @@
-# A part of pdfrw (pdfrw.googlecode.com)
-# Copyright (C) 2006-2009 Patrick Maupin, Austin, Texas
+# A part of pdfrw (https://github.com/pmaupin/pdfrw)
+# Copyright (C) 2006-2015 Patrick Maupin, Austin, Texas
# MIT license -- See LICENSE.txt for details
'''
@@ -7,25 +7,32 @@ PDF Exceptions and error handling
'''
import logging
-from exceptions import Exception
logging.basicConfig(
format='[%(levelname)s] %(filename)s:%(lineno)d %(message)s',
- level=logging.WARNING)
+ level=logging.WARNING)
log = logging.getLogger('pdfrw')
class PdfError(Exception):
"Abstract base class of exceptions thrown by this module"
+
def __init__(self, msg):
self.msg = msg
+
def __str__(self):
return self.msg
+
class PdfParseError(PdfError):
"Error thrown by parser/tokenizer"
+
class PdfOutputError(PdfError):
"Error thrown by PDF writer"
+
+
+class PdfNotImplementedError(PdfError):
+ "Error thrown on missing features"