public function findOrFail($name)
    {
        $result = $this->find($name);

        if (is_null($result)) {
            throw new CollectionItemNotFoundException(sprintf('Collection item "%s" not found', $name));
        }

        return $result;
    }
public function findOrFail($name)
    {
        $result = $this->find($name);

        if (is_null($result)) {
            throw new CollectionItemNotFoundException(sprintf('Collection item "%s" not found', $name));
        }

        return $result;
    }
public function findOrFail ( $ name ) { $ result = $ this -> find ( $ name ) ; if ( is_null ( $ result ) ) { throw new CollectionItemNotFoundException ( sprintf ( 'Collection item "%s" not found' , $ name ) ) ; } return $ result ; }
Find a specific collection item or throw's an exception.

@param string $name

@return mixed
Find a specific collection item or throw s an exception .