Skip to content

Commit

Permalink
Don't hide error, no error loop
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Sep 3, 2024
1 parent ff6aeae commit 4740494
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 4740494

Please sign in to comment.