public function findOrFail($selector)
    {
        $result = $this->find($selector);
        if ($result->length === 0) {
            if (\is_string($selector)) {
                throw new \Exception('Find with selector "'.$selector.'" failed!');
            }
            throw new \Exception('Find with node (collection) as selector failed!');
        }
        return $result;
    }
public function findOrFail($selector)
    {
        $result = $this->find($selector);
        if ($result->length === 0) {
            if (\is_string($selector)) {
                throw new \Exception('Find with selector "'.$selector.'" failed!');
            }
            throw new \Exception('Find with node (collection) as selector failed!');
        }
        return $result;
    }
public function findOrFail ( $ selector ) { $ result = $ this -> find ( $ selector ) ; if ( $ result -> length === 0 ) { if ( \ is_string ( $ selector ) ) { throw new \ Exception ( 'Find with selector "' . $ selector . '" failed!' ) ; } throw new \ Exception ( 'Find with node (collection) as selector failed!' ) ; } return $ result ; }
Get the descendants of each element in the current set of matched elements, filtered by a selector.
If no results are found a exception is thrown.

@param string|static|\DOMNodeList|\DOMNode $selector A string containing a selector expression,
or DomQuery|DOMNodeList|DOMNode instance to match against

@return static
@throws \Exception if no results are found
Get the descendants of each element in the current set of matched elements filtered by a selector . If no results are found a exception is thrown .