Formater + try/catch error

This commit is contained in:
yannfrendo
2023-11-29 14:33:20 +01:00
parent 5d4d04f5ae
commit 72b8b2d281
2 changed files with 11 additions and 14 deletions
@@ -200,10 +200,10 @@ export class MetadataRepository implements IMetadataRepository {
}
async writeTags(path: string, tags: Partial<Tags>): Promise<void> {
await exiftool.write(path, tags, ['-overwrite_original']).catch((error) => {
this.logger.warn(`Error writing exif data (${path}): ${error}`, error?.stack);
return null;
});
try {
await exiftool.write(path, tags, ['-overwrite_original']);
} catch (error) {
this.logger.warn(`Error writing exif data (${path}): ${error}`);
}
}
}