From 214880ec2c1c86ffa3c3bff0563bfdfe5b8fe16e Mon Sep 17 00:00:00 2001 From: Kelvin Zhang Date: Mon, 9 Nov 2015 13:17:58 +0000 Subject: [PATCH] #4: Remove re-thrown ModelNotFoundException --- app/Playlist.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/Playlist.php b/app/Playlist.php index 216b0cb1..8d8ac4ec 100644 --- a/app/Playlist.php +++ b/app/Playlist.php @@ -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++;