Can't write a full answer, but let me address some points of confusion. 1) "Best practices" are not literally "best"; they are things that worked well in practice for people who were their original advocates - they aren't all going to be fully consistent. 2) Exceptions are not for users, they are for developers. 3) The idea is not to make a custom exception type for every function, but to design a small family of parameterized exception classes that will be of help to you and your team, and are tailor-made for the kinds of exceptional circumstances that can arise in your application. 1/2
↧