Rev 2 of Thrift, the Pillar successor

Summary: End-to-end communications and serialization in C++ is working

Reviewed By: aditya

Test Plan: See the new top-level test/ folder. It vaguely resembles a unit test, though it could be more automated.

Revert Plan: Revertible

Notes: Still a LOT of optimization work to be done on the generated C++ code, which should be using dynamic memory in a number of places. Next major task is writing the PHP/Java/Python generators.




git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664712 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/src/main.cc b/compiler/src/main.cc
index cc126f8..8d8263c 100644
--- a/compiler/src/main.cc
+++ b/compiler/src/main.cc
@@ -137,6 +137,7 @@
   
   // Parse it
   g_program = new t_program(name);
+
   if (yyparse() != 0) {
     failure("Parser error.");
   }
@@ -146,6 +147,8 @@
     t_cpp_generator* cpp = new t_cpp_generator();
     cpp->generate_program(g_program);
     delete cpp;
+  } catch (string s) {
+    printf("Error: %s\n", s.c_str());
   } catch (const char* exc) {
     printf("Error: %s\n", exc);
   }