Fixed serialization logic for collections containing typedefs or enums


			       


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664746 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/src/thrift.py b/compiler/src/thrift.py
index 8321bcd..9282620 100644
--- a/compiler/src/thrift.py
+++ b/compiler/src/thrift.py
@@ -24,5 +24,8 @@
 
     p.parse(filename, False)
 
+    if len(p.errors):
+	sys.exit(-1)
+
     [g(p.program, filename) for g in generators]