CakeFest 2024: The Official CakePHP Conference

Throwable::getCode

(PHP 7, PHP 8)

Throwable::getCode例外コードを取得する

説明

public Throwable::getCode(): int

スローされたオブジェクトのエラーコードを返します。

パラメータ

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

戻り値

例外コードを返します。 Exception の場合は int ですが、 その派生クラスでは別の型かもしれません (たとえば PDOException の場合は string です)。

参考

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top