protected function ungracefulExit($beginning_with, $tree_data)
    {
        if ($beginning_with == count($tree_data)) {
            throw new \Exception('This tree has some missing parent items: ' . print_r($tree_data, true));
        }
    }
protected function ungracefulExit($beginning_with, $tree_data)
    {
        if ($beginning_with == count($tree_data)) {
            throw new \Exception('This tree has some missing parent items: ' . print_r($tree_data, true));
        }
    }
protected function ungracefulExit ( $ beginning_with , $ tree_data ) { if ( $ beginning_with == count ( $ tree_data ) ) { throw new \ Exception ( 'This tree has some missing parent items: ' . print_r ( $ tree_data , true ) ) ; } }
Exit the tree creation if the tree can't be built completely

@param int $beginning_with The number of nodes left to place on the tree
@param array $tree_data The rest of the tree data to place
@throws \Exception
Exit the tree creation if the tree can t be built completely