postMessage and exception handling