Rescue localStorage write errors.