• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

HTML5 [SOLVED] Error Handling

C

Cupid Stunt

Guest
I'm designing my games for HTML 5 deployment using NodeJS as a server.
I am looking for error/exception handling that will work for this platform. So far my reading on here says that as of May this year it was listed as a future feature. Is there any news on this yet?

I can do bounds checking to prevent the exceptions but it only takes 1/3 of the time if I just let the exception happen and ignore it.
 

rytan451

Member
Exceptions are meant to be exceptional. It's not good practice to code something where normal use would cause exceptions. They're harder to read and computationally more expensive than just doing a check to see if things are valid.

Of course, if you find yourself constantly rewriting bounds checking code, I'd recommend putting it in a script. DRY is a thing. (Don't Repeat Yourself).
 
Top