2 ms·
> but IMO thats better than crashing the whole process It's not. Crashing the process (if the error remains unhandled at the top level) is the right answer. Wh
by the_af 6y ago
> but IMO thats better than crashing the whole process
It's not. Crashing the process (if the error remains unhandled at the top level) is the right answer. When the program raises an exception, you want to either handle it or pass it up, not ignore it. It was raised for a reason. Once an error was raised, if the program ignores it and happily continues all bets are off. This is like reasoning out of false premises: everything goes, which is undesirable. Data is probably corrupted, maybe preconditions are unmet.
For this reason, most automated code checkers consider ignoring exceptions a serious antipattern.