From 81b72c5154430076dfc889f55f58ca2402497ea1 Mon Sep 17 00:00:00 2001 From: Jamie Madill Date: Wed, 8 Nov 2017 13:50:14 -0500 Subject: layers: Return an error when generator scripts fail. Currently the scripts would abort with an error message, but not an OS error code. Adding an error code allows build systems to correctly detect the script failure as a failed build step. Change-Id: I142a6215a3c02e6a880bfce0c3aba2c3c8fc4ff1 --- scripts/parameter_validation_generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/parameter_validation_generator.py') diff --git a/scripts/parameter_validation_generator.py b/scripts/parameter_validation_generator.py index 032b9fd8..85078a65 100644 --- a/scripts/parameter_validation_generator.py +++ b/scripts/parameter_validation_generator.py @@ -201,7 +201,7 @@ class ParameterValidationOutputGenerator(OutputGenerator): break if self.vuid_file == None: print("Error: Could not find vk_validation_error_messages.h") - quit() + sys.exit(1) # # Generate Copyright comment block for file def GenerateCopyright(self): @@ -246,7 +246,7 @@ class ParameterValidationOutputGenerator(OutputGenerator): def IdToHex(self, dec_num): if dec_num > 4294967295: print ("ERROR: Decimal # %d can't be represented in 8 hex digits" % (dec_num)) - sys.exit() + sys.exit(1) hex_num = hex(dec_num) return hex_num[2:].zfill(8) # -- cgit v1.2.3