Replaced fail with return Err

Closes https://github.com/PistonDevelopers/gfx_graphics/issues/85