# StaleObjectException

> Class yii\db\StaleObjectException.

[API reference](/docs/api/index.md) › [yii](/docs/api/yii/index.md) › [db](/docs/api/yii/db/index.md) › StaleObjectException

| class | `yii\db\StaleObjectException` |
| --- | --- |
| Extends | [`Exception`](/docs/api/yii/db/exception/index.md) » [`yii\base\Exception`](/docs/api/yii/base/exception/index.md) » [`Exception`](https://www.php.net/manual/en/class.exception.php) |
| Since | 2.0 |
| Source | [`framework/db/StaleObjectException.php`](https://github.com/yiisoft/yii2/blob/22.0/framework/db/StaleObjectException.php#L15) |

## Properties

| Property | Type | Description | Defined by |
| --- | --- | --- | --- |
| <span id="property-errorInfo"></span>[`$errorInfo`](/docs/api/yii/db/exception/index.md#property-errorInfo) | `array` | The error info provided by a PDO exception. Default: `[]`. | [`Exception`](/docs/api/yii/db/exception/index.md) |

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| <span id="method-__construct"></span>[`__construct()`](/docs/api/yii/db/exception/index.md#method-__construct) | Constructor. | [`Exception`](/docs/api/yii/db/exception/index.md) |
| <span id="method-__toString"></span>[`__toString()`](/docs/api/yii/db/exception/index.md#method-__toString) |  | [`Exception`](/docs/api/yii/db/exception/index.md) |
| [`getName()`](#method-getName) |  | `StaleObjectException` |

## Method details

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

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

**Returns**

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