protected function getLogOrFail($date) { $log = null; try { $log = $this->logViewer->get($date); } catch (LogNotFoundException $e) { abort(404, $e->getMessage()); } return $log; }