クラス yii\db\StaleObjectException
| 継承 | yii\db\StaleObjectException » yii\db\Exception » yii\base\Exception » Exception |
|---|---|
| 利用可能なバージョン | 2.0 |
| ソースコード | https://github.com/yiisoft/yii2/blob/master/framework/db/StaleObjectException.php |
公開メソッド
| メソッド | 説明 | 定義元 |
|---|---|---|
| __construct() | コンストラクタ。 | yii\db\Exception |
| __toString() | yii\db\Exception | |
| getName() | yii\db\StaleObjectException |
メソッドの詳細
定義元: yii\db\Exception::__construct()
コンストラクタ。
| public void __construct ( $message, $errorInfo = [], $code = '', $previous = null ) | ||
| $message | 文字列 |
PDOエラーメッセージ |
| $errorInfo | 配列 |
PDOエラー情報 |
| $code | 文字列 |
PDOエラーコード |
| $previous | Throwable|null |
例外チェーンに使用される前の例外。 |
public function __construct($message, $errorInfo = [], $code = '', $previous = null)
{
parent::__construct($message, 0, $previous);
$this->errorInfo = $errorInfo;
$this->code = $code;
}
| public 文字列 __toString ( ) | ||
| 戻り値 | 文字列 |
例外の読み取り可能な表現 |
|---|---|---|
public function __toString()
{
return parent::__toString() . PHP_EOL
. 'Additional Information:' . PHP_EOL . print_r($this->errorInfo, true);
}
サインアップ または ログイン してコメントしてください。