Ensure that waitForAll functions catch and log thrown errors
This commit is contained in:
parent
45fcf827dd
commit
9e54f55c22
6 changed files with 36 additions and 5 deletions
|
@ -1693,7 +1693,7 @@ async function requestShutdown() {
|
|||
}
|
||||
|
||||
getLogger().info('requestShutdown: Requesting close of mainWindow...');
|
||||
const request = new Promise<void>((resolveFn, reject) => {
|
||||
const request = new Promise<void>(resolveFn => {
|
||||
let timeout: NodeJS.Timeout | undefined;
|
||||
|
||||
if (!mainWindow) {
|
||||
|
@ -1705,7 +1705,10 @@ async function requestShutdown() {
|
|||
getLogger().info('requestShutdown: Response received');
|
||||
|
||||
if (error) {
|
||||
return reject(error);
|
||||
getLogger().error(
|
||||
'requestShutdown: got error, still shutting down.',
|
||||
error
|
||||
);
|
||||
}
|
||||
clearTimeoutIfNecessary(timeout);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue