Add apk_name information in error message

Logging the apk_name will improve debugging process if
`GetMinSdkVersion` returns an exception.

Test: None
Change-Id: I3ddf602d92701dcaaa4821fe42a76a870a721a11
This commit is contained in:
Spandan Das 2024-03-25 21:24:33 +00:00
parent aa26ce4d75
commit 198dcf91ca

View file

@ -2456,7 +2456,7 @@ def GetMinSdkVersion(apk_name):
m = re.match(r'(?:minSdkVersion|sdkVersion):\'([^\']*)\'', line)
if m:
return m.group(1)
raise ExternalError("No minSdkVersion returned by aapt2")
raise ExternalError("No minSdkVersion returned by aapt2 for apk: {}".format(apk_name))
def GetMinSdkVersionInt(apk_name, codename_to_api_level_map):