// test code try { throw new Error(404) } catch (e) { window.location.href = `http://stackoverflow.com/search?q=[js]+${e.message}`; }