mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 08:44:33 +02:00
Improve error handling
This commit is contained in:
@@ -643,8 +643,12 @@ async function thumbCacheCleanup(folder, imgCount) {
|
||||
const t1 = performance.now();
|
||||
log(`Thumbnail DB cleanup: folder=${folder} kept=${staticGalleryHashes.size} deleted=${delcount} time=${Math.floor(t1 - t0)}ms`);
|
||||
})
|
||||
.catch((err) => {
|
||||
error('Thumbnail DB cleanup: Cleanup failed.', err.message);
|
||||
.catch((reason) => {
|
||||
if (reason instanceof Error) {
|
||||
error('Thumbnail DB cleanup: Cleanup failed.', reason.message);
|
||||
} else {
|
||||
log('Thumbnail DB cleanup:', reason);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
cb_clearMsg();
|
||||
|
||||
Reference in New Issue
Block a user