Make sure we catch value errors from the game engine.

Should be a pretty straightforwards fix.