3 ms·
Visual Basic had this "feature" with the "On Error Resume Next" command. It was universally hated among people who had to maintain VB code, and was a sure fire
by jlarocco 11y ago
Visual Basic had this "feature" with the "On Error Resume Next" command. It was universally hated among people who had to maintain VB code, and was a sure fire way to spot crappy code.
I don't even understand the point of this type of coding. If a program throws an exception and crashes, it means my assumptions were wrong, and the code is handling data it wasn't meant to handle, and needs to be fixed. If I got that part wrong, it's very likely the code around that section is also wrong in some way. On the other hand, if I don't care that the computation fails, why did I have it there at all?
- asveikau 11y agoI went into these comments looking for the reference to "on error resume next", wondering why it took a while. I guess a bunch of the younger crowd here won't remember it. It's worth mentioning that shell scripts also tend to lean towards keeping chugging when they encounter errors, and writing proper error checks in a shell script can be tedious and troublesome. I know I have been bitten by this.
- bashinator 11y ago`set +e` is your friend, as is pipefail.