this post was submitted on 17 Jan 2025
370 points (99.2% liked)

Programmer Humor

32710 readers
110 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 93 points 1 week ago (3 children)

Still not as excellent as On Error Resume Next

Imagine the sheer ~~idiocy~~ genius 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.

[–] [email protected] 25 points 1 week ago

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.

[–] thebestaquaman 3 points 1 week ago
[–] [email protected] -1 points 1 week ago (3 children)

So catching errors and doing nothing? That exists in every language except maybe BASIC?

[–] [email protected] 5 points 1 week ago

Catching individual errors is fine. Having all errors be ignored by default is weird.

[–] [email protected] 2 points 1 week ago

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.

[–] [email protected] 1 points 1 week ago

Ignoring every exception, including divisions by zero, is something I've never seen outside of BASIC and shell scripting. Even C and assembly will shit themselves when you do some of the shit that ON ERROR RESUME NEXT will ignore.