From 66063fe30ed3c419fdc095167157f5c31c054eb6 Mon Sep 17 00:00:00 2001 From: Sander Cox Date: Mon, 15 Jun 2020 12:00:20 +0200 Subject: [PATCH] Added error return codes for the binary builder when used in build process they should fail when they did not run successfully. --- extras/BinaryBuilder/Source/Main.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/extras/BinaryBuilder/Source/Main.cpp b/extras/BinaryBuilder/Source/Main.cpp index 9716d7c10f..5e69066640 100644 --- a/extras/BinaryBuilder/Source/Main.cpp +++ b/extras/BinaryBuilder/Source/Main.cpp @@ -109,7 +109,7 @@ int main (int argc, char* argv[]) " resultant class, but #ifdef'ed out using the name of the sub-directory (hard to\n" " explain, but obvious when you try it...)\n"; - return 0; + return 2; // USAGE } const File sourceDirectory (File::getCurrentWorkingDirectory() @@ -121,7 +121,7 @@ int main (int argc, char* argv[]) << sourceDirectory.getFullPathName() << std::endl << std::endl; - return 0; + return 1; // General ERROR } const File destDirectory (File::getCurrentWorkingDirectory() @@ -132,7 +132,7 @@ int main (int argc, char* argv[]) std::cout << "Destination directory doesn't exist: " << destDirectory.getFullPathName() << std::endl << std::endl; - return 0; + return 1; // General ERROR } String className (argv[3]); @@ -153,7 +153,7 @@ int main (int argc, char* argv[]) { std::cout << "Didn't find any source files in: " << sourceDirectory.getFullPathName() << std::endl << std::endl; - return 0; + return 1; // General ERROR } headerFile.deleteFile(); @@ -165,7 +165,7 @@ int main (int argc, char* argv[]) { std::cout << "Couldn't open " << headerFile.getFullPathName() << " for writing" << std::endl << std::endl; - return 0; + return 126; // NO_PERM } std::unique_ptr cpp (cppFile.createOutputStream()); @@ -174,7 +174,7 @@ int main (int argc, char* argv[]) { std::cout << "Couldn't open " << cppFile.getFullPathName() << " for writing" << std::endl << std::endl; - return 0; + return 126; // NO_PERM } *header << "/* (Auto-generated binary data file). */\r\n\r\n"