« Throwable::getTraceAsString
Throwable::__toString »

Throwable::getPrevious

(PHP 7, PHP 8)

Throwable::getPrevious — ひとつ前の Throwable を返す

説明

public function Throwable::getPrevious(): ?Throwable

ひとつ前の Throwable (たとえば Exception::__construct() の第三パラメータで指定したもの) を返します。

パラメータ

この関数にはパラメータはありません。

戻り値

ひとつ前の Throwable が存在すればそれを返します。 存在しない場合は null を返します。

参考

関連キーワード:
Throwable   getPrevious   Exception   getTraceAsString   toString   construct   参考
関連する関数・ページ:
class.throwable   throwable.getfile   throwable.tostring   error.getprevious   exception.getprevious   throwable.getcode