correctly catching exceptions around window.localStorage calls, otherwise window.localStorage calls can crash iframed applications using flight