# ViewNotFoundException

> ViewNotFoundException represents an exception caused by view file not found.

[API reference](/docs/api/index.md) › [yii](/docs/api/yii/index.md) › [base](/docs/api/yii/base/index.md) › ViewNotFoundException

| class | `yii\base\ViewNotFoundException` |
| --- | --- |
| Extends | [`InvalidArgumentException`](/docs/api/yii/base/invalidargumentexception/index.md) » [`BadMethodCallException`](https://www.php.net/manual/en/class.badmethodcallexception.php) |
| Since | 2.0.10 |
| Source | [`framework/base/ViewNotFoundException.php`](https://github.com/yiisoft/yii2/blob/22.0/framework/base/ViewNotFoundException.php#L17) |

ViewNotFoundException represents an exception caused by view file not found.

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`getName()`](#method-getName) |  | `ViewNotFoundException` |

## Method details

### getName() <span id="method-getName"></span>

```php
public function getName(): string
```

**Returns**

`string`: The user-friendly name of this exception