Ignore exceptions during alert (no support in htmlunit and phantomjs).