Skip to content

Commit

Permalink
tw: better errors
Browse files Browse the repository at this point in the history
Signed-off-by: Varun Patil <[email protected]>
  • Loading branch information
pulsejet committed Mar 10, 2024
1 parent 94659df commit e92eac8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Db/TimelineWrite.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ public function processFile(

// Check if EXIF is blank, which is probably wrong
if (0 === \count($exif)) {
throw new \Exception('No EXIF data could be read: '.$file->getPath());
throw new \Exception('No EXIF data could be read');
}

// Check if MIMEType was not detected
if (empty($exif['MIMEType'] ?? null)) {
throw new \Exception('No MIMEType in EXIF data: '.$file->getPath());
throw new \Exception('No MIMEType in EXIF data');
}

// Hand off if Live Photo video part
Expand Down
1 change: 1 addition & 0 deletions lib/Listeners/PostWriteListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public function handle(Event $event): void
} catch (\Exception $e) {
$this->logger->error('Failed to process file EXIF data', [
'app' => 'memories',
'path' => $node->getPath(),
'message' => $e->getMessage(),
]);
}
Expand Down

0 comments on commit e92eac8

Please sign in to comment.