Added code to fall back to the DefaultTable (and therefore to hex XML dumps) when an exception occurs during decompilation.


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@44 4cde692c-a291-49d1-8350-778aa11640f8
diff --git a/Lib/fontTools/ttLib/tables/DefaultTable.py b/Lib/fontTools/ttLib/tables/DefaultTable.py
index 745f237..e960ff3 100644
--- a/Lib/fontTools/ttLib/tables/DefaultTable.py
+++ b/Lib/fontTools/ttLib/tables/DefaultTable.py
@@ -15,6 +15,11 @@
 		return self.data
 	
 	def toXML(self, writer, ttFont):
+		if hasattr(self, "ERROR"):
+			writer.comment("An error occurred during the decompilation of this table")
+			writer.newline()
+			writer.comment(self.ERROR)
+			writer.newline()
 		writer.begintag("hexdata")
 		writer.newline()
 		writer.dumphex(self.compile(ttFont))