Catch localStorage quota exception. Fixes #1807