Merge pull request #115234 from Calinou/build-profile-improve-errors

Improve errors for invalid `build_profile` SCons options
This commit is contained in:
Thaddeus Crews 2026-01-28 12:27:03 -06:00
commit 2184f93865
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC

View file

@ -648,8 +648,11 @@ if env["build_profile"] != "":
dbo = ft["disabled_build_options"]
for c in dbo:
env[c] = dbo[c]
except json.JSONDecodeError:
print_error(f'Failed to open feature build profile: "{env["build_profile"]}"')
except json.JSONDecodeError as err:
print_error(f'Failed to open feature build profile due to JSON decoding error: "{env["build_profile"]}"\n{err}')
Exit(255)
except FileNotFoundError:
print_error(f'Feature build profile not found at: "{env["build_profile"]}"')
Exit(255)
# 'dev_mode' and 'production' are aliases to set default options if they haven't been