Catch window.onerror errors.