DEV Community

Discussion on: The Sonic 3D Blast "Level Select Hack" is so brilliant

Collapse
 
buntine profile image
Andrew Buntine

When I first entered the industry I was at a company who had written a custom CMS in ASP classic (pre-.NET). I noticed that every single file had the following statement at the top:

On Error Resume Next

After a couple of weeks I looked up it in the docs and found out, to my horror, that it's effectively saying "if there is a runtime error, just skip the offending expression and keep executing like everything is cool".

You could also do things like On Error GoTo SomeFunction that would do exactly what you'd think it might.

...Talk about dangerous programming! Hah.

Collapse
 
stefandorresteijn profile image
Stefan Dorresteijn

When I was learning C#, that's pretty much exactly what I did. Just try catch everything and have the catch do absolutely nothing. There I was, wondering why my application never did what I expected!

Collapse
 
ben profile image
Ben Halpern

Nice. I'm sure everyone, with enough experience, has a tale or two like this.