Skip to content

Commit

Permalink
cleaner error handling in metadata script
Browse files Browse the repository at this point in the history
  • Loading branch information
samansmink committed Nov 6, 2024
1 parent 0d7e751 commit 3930e25
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/append_extension_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ def main():
try:
with open(args.duckdb_platform_file, 'r') as file:
PLATFORM = file.read().strip()
if not PLATFORM:
raise Exception("File is empty!")
except Exception as e:
raise Exception(f"Failed to read platform from file: {args.duckdb_platform_file}: {e}")
print(f"Failed to read platform from file {args.duckdb_platform_file}")
raise
if not PLATFORM:
raise Exception(f"Platform file passed to script is empty: {args.duckdb_platform_file}")
else:
raise Exception(f"Neither --duckdb-platform nor --duckdb-platform-file found, please specify the platform using either")

Expand Down

0 comments on commit 3930e25

Please sign in to comment.