scrom / Experiments

a NodeJS text adventure - deliberately coded badly to re-experience the pain of legacy code
http://mvta.herokuapp.com/
2 stars 0 forks source link

Unhandled exceptions from game ticks can crash game #408

Closed scrom closed 8 years ago

scrom commented 8 years ago

Player actions that cause server-side exceptions are handled gracefully in a try-catch block. 'Ticks' that throw exceptions aren't. This needs fixing for stability. Need to decide what info and message to show to user and what extra context to log ( Ideally log what object threw the error, call stack with line numbers and an attribute dump of the offending object. This may need handling at map level rather than action level to trap a single loop iteration of a map object with a problem. Possibly just wrap individual object 'tick' calls with an exception handler

scrom commented 8 years ago

fixed. there are still places in the game that don't handle exceptions but these are also not under active development (and are stable, tested and working) The main risk areas are now handled.