From 822ff966c6dcc8bf5dc9b87d0b4e4ac2f7102e8b Mon Sep 17 00:00:00 2001 From: Sergii Dmytruk Date: Sat, 22 Jun 2024 20:42:16 +0300 Subject: BaseTools/GenerateCapsule.py: Better error message on --decode failure Print error text from the exception. Signed-off-by: Sergii Dmytruk --- BaseTools/Source/Python/Capsule/GenerateCapsule.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'BaseTools') diff --git a/BaseTools/Source/Python/Capsule/GenerateCapsule.py b/BaseTools/Source/Python/Capsule/GenerateCapsule.py index de1dbbab5f..4d4e526432 100644 --- a/BaseTools/Source/Python/Capsule/GenerateCapsule.py +++ b/BaseTools/Source/Python/Capsule/GenerateCapsule.py @@ -873,8 +873,8 @@ if __name__ == '__main__': print ('GenerateCapsule: error: can not write embedded driver file {File}'.format (File = EmbeddedDriverPath)) sys.exit (1) - except: - print ('GenerateCapsule: error: can not decode capsule') + except Exception as Msg: + print ('GenerateCapsule: error: can not decode capsule: ' + str(Msg)) sys.exit (1) GenerateOutputJson(PayloadJsonDescriptorList) PayloadIndex = 0 -- cgit v1.2.3