Rewrite to remove the need for an `else` block:
```php
if (!function_exists($function)) {
    throw new Exception/*...*/;
}
$this->functions[] = $function;
```