Skip to content

Commit

Permalink
Merge pull request #5 from biigle/patch-1
Browse files Browse the repository at this point in the history
Fix exception messages
  • Loading branch information
mzur authored Jan 8, 2025
2 parents 8a7a073 + 5b09aa1 commit 905c16e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Coco.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function validateCategoriesInData(): void

foreach ($this->annotations as $annotation) {
if (!in_array($annotation->category_id, $categoryIds)) {
throw new \Exception("Invalid category ID '{$annotation['category_id']}' in annotation '{$annotation['id']}'");
throw new \Exception("Invalid category ID '{$annotation->category_id}' in annotation '{$annotation->id}'");
}
}
}
Expand All @@ -98,7 +98,7 @@ public function validateImagesInData(): void

foreach ($this->annotations as $annotation) {
if (!in_array($annotation->image_id, $imageIds)) {
throw new \Exception("Invalid image ID '{$annotation['image_id']}' in annotation '{$annotation['id']}'");
throw new \Exception("Invalid image ID '{$annotation->image_id}' in annotation '{$annotation->id}'");
}
}
}
Expand Down

0 comments on commit 905c16e

Please sign in to comment.