JeroenSchmidt commented on code in PR #3649:
URL: https://github.com/apache/iceberg-python/pull/3649#discussion_r3959707504
##########
pyiceberg/exceptions.py:
##########
@@ -146,3 +146,15 @@ class WaitingForLockException(Exception):
class ValidationException(Exception):
"""Raised when validation fails."""
+
+
+class NoSuchSnapshotRefError(ValueError):
+ """Raised when a named snapshot ref (branch or tag) does not exist."""
+
+
+class SnapshotRefTypeError(ValueError):
+ """Raised when an operation expects a branch and gets a tag (or vice
versa)."""
+
+
+class NotAncestorError(ValueError):
+ """Raised when an operation requires ancestry between two snapshots and it
does not hold."""
Review Comment:
I'm glad you agree with this 😄
I find that these kind of exception types help a lot when you need tighter
flow control when using iceberg within the IO interface / framework layer of an
application
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]