[Checkins] SVN: zopyx.convert2/branches/error-handling/src/zopyx/convert2/exceptions.py added

Andreas Jung andreas at andreas-jung.com
Sat May 15 10:13:05 EDT 2010


Log message for revision 112331:
  added
  

Changed:
  A   zopyx.convert2/branches/error-handling/src/zopyx/convert2/exceptions.py

-=-
Added: zopyx.convert2/branches/error-handling/src/zopyx/convert2/exceptions.py
===================================================================
--- zopyx.convert2/branches/error-handling/src/zopyx/convert2/exceptions.py	                        (rev 0)
+++ zopyx.convert2/branches/error-handling/src/zopyx/convert2/exceptions.py	2010-05-15 14:13:04 UTC (rev 112331)
@@ -0,0 +1,17 @@
+##########################################################################
+# zopyx.convert2 - XSL-FO related functionalities
+#
+# (C) 2007, 2008, ZOPYX Ltd & Co. KG, Tuebingen, Germany
+##########################################################################
+
+class ConversionError(Exception):
+
+    def __init__(self, error_msg, output):
+        self.error_msg = error_msg
+        self.output = output
+
+    def __str__(self):
+        return '%s\nOutput:\n%s' % (self.error_msg, self.output)
+
+if __name__ == '__main__':
+    raise ConversionError('blabla', 'hello world')



More information about the checkins mailing list