Skip to content

[Uid] Unify InvalidUuidException and InvalidUlidException #60328

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 7.3
Choose a base branch
from

Conversation

rela589n
Copy link
Contributor

@rela589n rela589n commented May 2, 2025

Q A
Branch? 7.3
Bug fix? no
New feature? no
Deprecations? no
License MIT

This PR unifies InvalidUuidException and InvalidUlidException, created as the part of #60226 . InvalidUidException in itself gives enough context about its origin, and it's possible to determine whence the exception originated from by checking its getFile, or checking the trace.

Therefore, it's not necessary to make two exceptions if there can be only one.

@carsonbot carsonbot added this to the 7.3 milestone May 2, 2025
@rela589n rela589n changed the title [Uid] Unify InvalidUuidException and InvalidUlidException into single Inval… [Uid] Unify InvalidUuidException and InvalidUlidException May 2, 2025
@derrabus
Copy link
Member

derrabus commented May 2, 2025

If we suddenly start to throw a different exception, wouldn't this break existing code that catches the "old" exception?

@rela589n
Copy link
Contributor Author

rela589n commented May 2, 2025

Hi @derrabus ,

If we suddenly start to throw a different exception, wouldn't this break existing code that catches the "old" exception?

That's a great question.

No, it wouldn't break, since it has never been released.

That's why I'm opening this PR now, so that these two exceptions won't create backward compatibility promise starting from 7.3 and onward.

@OskarStark
Copy link
Contributor

Yes, it is not released yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants