« Throwable::getMessage
Throwable::getFile »

Throwable::getCode

(PHP 7, PHP 8)

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

説明

public function Throwable::getCode(): int

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

パラメータ

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

戻り値

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

参考

関連キーワード:
Throwable   getCode   Exception   getMessage   getFile   エラーコード   派生   PDOException
関連する関数・ページ:
throwable.getmessage   throwable.getfile   throwable.getprevious   class.throwable   throwable.tostring   error.getcode

他のマニュアルの関連ページ