/** * @throws 404 */ private function getAttachedFileSize($id) { try { return $this->file_manager->getAttachedFileSize($id); } catch (FileNotFoundException $e) { throw new RestException(404); } }