Thrift CSharp build to check compiler return code
authorMark Slee <mcslee@apache.org>
Tue, 22 Jan 2008 04:04:30 +0000 (04:04 +0000)
committerMark Slee <mcslee@apache.org>
Tue, 22 Jan 2008 04:04:30 +0000 (04:04 +0000)
Summary: If non-zero, toss an error to the log

Reviewed By: dreiss

Other Notes: Submitted by Will Palmeri

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665439 13f79535-47bb-0310-9956-ffa450edef68

lib/csharp/ThriftMSBuildTask/ThriftBuild.cs

index 9cf5f41..a2bb641 100644 (file)
@@ -175,6 +175,11 @@ namespace ThriftMSBuildTask
                                p.StartInfo.RedirectStandardOutput = false;
                                p.Start();
                                p.WaitForExit();
+                               if (p.ExitCode != 0)
+                               {
+                                       LogMessage("thrift.exe failed to compile " + thriftFile, MessageImportance.High);
+                                       return false;
+                               }
                        }
 
                        Csc csc = new Csc();