Throwable::getPrevious

(PHP 7, PHP 8)

Throwable::getPrevious返回先前的 Throwable

說明

public Throwable::getPrevious(): ?Throwable

返回任意一個先前的錯誤 (例如, Exception::__construct()中提供的第三個參數(shù))。

參數(shù)

此函數(shù)沒有參數(shù)。

返回值

如果有的話,返回先前的 Throwable,否則就返回 null

參見