Skip to content

Commit

Permalink
feat: more specific error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
willmaclean committed Jul 9, 2024
1 parent 3a9a082 commit f608036
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lea/clients/duckdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ def _table_reference_to_view_key(self, table_reference: str) -> tuple[str]:
('schema', 'subschema', 'table')
"""
database, leftover = table_reference.split(".", 1)
try:
database, leftover = table_reference.split(".", 1)
except ValueError:
raise Exception("Specify the full path to the table, e.g. 'schema.table'")
if database == self.path.stem:
schema, leftover = leftover.split(".", 1)
else:
Expand Down

0 comments on commit f608036

Please sign in to comment.