Imagine the sheer idiocygenius required to add a language feature where, if an error occurred, the handling method is to just pretend that line of code never existed and continue onto the next line.
VBA is truly the language of savants.
940
Reply
PowerShell does that by default, and it's my least favorite feature in my most used language.
$ErrorActionPreference = Stop
At the start of almost every script.
250
Reply
bash
set -e
20
Reply
set -e
40
Reply
So catching errors and doing nothing? That exists in every language except maybe BASIC?
23
Reply
Catching individual errors is fine. Having all errors be ignored by default is weird.
70
Reply
Very different. This means default ignore all errors and continue to the next line. You’d have to explicitly catch every line in most(all?) other languages.
30
Reply
20
Reply
Ship it.
490
Reply
Like putting electrical tape over your check engine light.
330
Reply
I wrap every line of code in a try catch block, even my try catch blocks are in try catch blocks just in case the first accidentally drops it after catching it
310
Reply
Yo dawg, I heard you like try-catch blocks
90
Reply
Average node bug solving
250
Reply
js
process.on('uncaughtException', console.error)
80
Reply
That's fucking hilarious
180
Reply
except: pass
160
Reply
I came across a stack overflow recently about how to do something in a jasmine unit test. Someone gave a solution of “I just changed the test to xit(“… and now there are no errors!”
Still not as excellent as
On Error Resume NextImagine the sheer
idiocygenius required to add a language feature where, if an error occurred, the handling method is to just pretend that line of code never existed and continue onto the next line.VBA is truly the language of savants.
PowerShell does that by default, and it's my least favorite feature in my most used language.
$ErrorActionPreference = Stop
At the start of almost every script.
set -eset -eSo catching errors and doing nothing? That exists in every language except maybe BASIC?
Catching individual errors is fine. Having all errors be ignored by default is weird.
Very different. This means default ignore all errors and continue to the next line. You’d have to explicitly catch every line in most(all?) other languages.