Skip to content

Commit

Permalink
scripts: Better warning for getting reg.py
Browse files Browse the repository at this point in the history
  • Loading branch information
spencer-lunarg committed Sep 12, 2024
1 parent ea5774a commit eb62fb3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/generate_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ def RunGenerators(api: str, registry: str, targetFilter: str) -> None:
scripts_directory_path = os.path.dirname(os.path.abspath(__file__))
registry_headers_path = os.path.join(scripts_directory_path, scripts)
sys.path.insert(0, registry_headers_path)
from reg import Registry
try:
from reg import Registry
except:
print("ModuleNotFoundError: No module named 'reg'") # normal python error message
print(f'{registry_headers_path} is not pointing to the Vulkan-Headers registry directory.')
print("Inside Vulkan-Headers there is a registry/reg.py file that is used.")
sys.exit(1) # Return without call stack so easy to spot error

from generators.base_generator import BaseGeneratorOptions
from generators.dispatch_table_generator import DispatchTableOutputGenerator
Expand Down

0 comments on commit eb62fb3

Please sign in to comment.