3 ms·
Except maybe healthcare or finance or nuclear plant management software...
by akx 6y ago
Except maybe healthcare or finance or nuclear plant management software...
- perl4ever 6y agoTurning off exceptions in this case doesn't prevent you from handling errors. You just have to check the error object to see.
- the_af 6y agoNo, this is not what the person who mentioned ON ERROR RESUME NEXT is arguing. They are arguing in some cases it's better if the program plods along and produces any output, even wrong output, rather than crashing. I think the post above explains why this isn't the case in mission critical software. I'd argue the lesson from software engineering is that it's not advisable in most situations, not just for nuclear reactors. The error was raised by a reason, after all. I'd say it's the opposite: there are some limited cases where you absolutely know the exception is not relevant, and in those cases you can knowingly swallow the exception.
- perl4ever 6y agoThey stated that the feature "would simply ignore all exceptions". It allows you to ignore all exceptions, but you don't have to and probably wouldn't in most cases. It was an example of blaming a tool for a hypothetical misuse that is not the only way you can use it.
- the_af 6y agoI think the original poster implied one would indeed use it to ignore all exceptions. But also, it's exactly like an empty catch all exceptions block, which is considered a mistake today, for good reason. I'll go an extra mile and say I'm familiar with this construct in Basic, have seen it used, and nobody ever checked any error codes when using it. It's a footgun that's used almost exclusively to shoot at feet.