tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

browser_fail_uncaught_rejection.js (415B)


      1 function test() {
      2  Promise.reject(new Error("Promise rejection."));
      3  (async () => {
      4    throw new Error("Synchronous rejection from async function.");
      5  })();
      6 
      7  // The following rejections are caught, so they won't result in failures.
      8  Promise.reject(new Error("Promise rejection.")).catch(() => {});
      9  (async () => {
     10    throw new Error("Synchronous rejection from async function.");
     11  })().catch(() => {});
     12 }