src/Repository.php
public function findOrFail($name)
    {
        $component = $this->find($name);

        if ($component !== null) {
            return $component;
        }

        throw new ComponentNotFoundException("Component [{$name}] does not exist!");
    }
public function findOrFail($name)
    {
        $component = $this->find($name);

        if ($component !== null) {
            return $component;
        }

        throw new ComponentNotFoundException("Component [{$name}] does not exist!");
    }
public function findOrFail ( $ name ) { $ component = $ this -> find ( $ name ) ; if ( $ component !== null ) { return $ component ; } throw new ComponentNotFoundException ( "Component [{$name}] does not exist!" ) ; }
Find a specific component, if there return that, otherwise throw exception.

@param $name

@return Component

@throws ComponentNotFoundException
Find a specific component if there return that otherwise throw exception .