added check for localstorage quota exceeded inside setState. close #167