THRIFT-3629 Parser sets exitcode on errors, but the generator does not
Client: Compiler (general)
Patch: Jens Geyer

This closes #861
diff --git a/compiler/cpp/src/main.cc b/compiler/cpp/src/main.cc
index 1b3b633..31402e0 100644
--- a/compiler/cpp/src/main.cc
+++ b/compiler/cpp/src/main.cc
@@ -1033,9 +1033,9 @@
       }
     }
   } catch (string s) {
-    printf("Error: %s\n", s.c_str());
+    failure("Error: %s\n", s.c_str());
   } catch (const char* exc) {
-    printf("Error: %s\n", exc);
+    failure("Error: %s\n", exc);
   }
 }