Join Nostr
2024-11-12 15:19:02 UTC
in reply to

Trey Hunner 🐍 on Nostr: This ☝ The built-in exceptions are good enough in most cases. If distinguishing ...

This ☝

The built-in exceptions are good enough in most cases.

If distinguishing between a KeyError and a MyLibraryKeyError is useful then make MyLibraryKeyError that inherits from KeyError.

If that's not useful today, but might be in the future then use KeyError now and you can always inherit from KeyError in that eventual future that might come one day.