chia-blockchain
chia-blockchain copied to clipboard
You don't want to catch `NameError`
You don't want to catch NameError
because it indicates a variable name typo or such. That should fail out hard so we see it quickly and fix it, not hide in the logs where we forget to look while developing and only hear about it when a user sends us a log asking about it. This is a general commentary on us catching all exceptions in lots of places without thinking about, or often even being aware of, all the relevant exceptions. NameError
in particular is just an example.
Originally posted by @altendky in https://github.com/Chia-Network/chia-blockchain/pull/13018#discussion_r956528100