#4: Remove re-thrown ModelNotFoundException

This commit is contained in:
Kelvin Zhang 2015-11-09 13:17:58 +00:00 committed by Peter Deltchev
parent b7f2b62587
commit 214880ec2c

View file

@ -226,11 +226,7 @@ class Playlist extends Model
continue;
}
try {
$trackFile = $track->trackFiles()->where('format', $format)->firstOrFail();
} catch (ModelNotFoundException $e) {
throw $e;
}
$trackFile = $track->trackFiles()->where('format', $format)->firstOrFail();
if ($trackFile->expires_at != null && File::exists($trackFile->getFile())) {
$cachedCount++;