Skip to content

Commit

Permalink
Merge pull request #9465 from camptocamp/error-hide
Browse files Browse the repository at this point in the history
Don't hide error, no error loop
  • Loading branch information
sbrunner authored Sep 3, 2024
2 parents ff6aeae + 4740494 commit 164bc38
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions buildtools/check-example.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,13 @@ const OSMImage = fileMock('osm.png', 'image/png');
const ASITVDCapabilities = fileMock('asitvd.capabilities.xml', 'text/xml');
const SgxCapabilities = fileMock('sgx.capabilities.xml', 'text/xml');
let browser;
let browserClosed = false;

process.on('unhandledRejection', async (error) => {
console.log(`UnhandledRejection: ${error.message}.`);
await browser.close();
process.on('unhandledRejection', async (reason, promise) => {
console.log('UnhandledRejection: ', promise, 'reason:', reason);
if (browser && !browserClosed) {
await browser.close();
}
process.exit(2);
});

Expand Down

0 comments on commit 164bc38

Please sign in to comment.