Closed
Description
Description
The deltalake
-Python module defines multiple exceptions which can be raised when working with the package (DeltaError
, TableNotFoundError
, CommitFailedError
, DeltaProtocolError
). However these exceptions are defined only in the "private" deltalake._internal
submodule, and not in the root module or a public submodule.
As I don't expect the interface of ._internal
to be stable it would be useful to expose them in a public module with a stable interface.
My suggestion would be to either:
- expose them via the root module
- expose them in dedicated public submodule
exceptions
I'm happy to open a PR for this.
Use Case
The user needs to import the exceptions if they want to do speficic exception handling, e.g.
try:
table = deltalake.DeltaTable(table_uri)
except deltalake.exceptions.TableNotFoundError:
logging.warning("Table '%s' not found, skipping", table_uri)
Related Issue(s)
None
Activity