Skip to content

Commit

Permalink
Try another way to get or fail a log
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanedev-maroc committed Dec 18, 2015
1 parent 6e483a3 commit 802217b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Http/Controllers/LogViewerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,16 @@ public function delete()
*/
private function getLogOrFail($date)
{
$log = null;

try {
return $this->logViewer->get($date);
$log = $this->logViewer->get($date);
}
catch(LogNotFound $e) {
abort(404, $e->getMessage());

return null;
}

return $log;
}

/**
Expand Down

0 comments on commit 802217b

Please sign in to comment.