Assign atom.lastUncaughtError in window.onerror handler