When to throw an exception?
My personal guideline is: an exception is thrown when a fundamental assumption of the current code block is found to be false. Example 1: say I have a function which is supposed to examine an arbitrary class and return true if that class inherits from List<>. This function asks the question, “Is this object a … Read more