Throwable

(PHP 7)

はじめに

Throwable は、PHP 7 の throw 文でスロー可能なあらゆるオブジェクトが実装する基底インターフェイスです。 ErrorException も、これを実装しています。

注意:

PHP のクラスが Throwable インターフェイスを直接実装することはできません。 そのかわりに、Exception を継承する必要があります。

インターフェイス概要

Throwable {
/* メソッド */
abstract public getMessage ( void ) : string
abstract public getCode ( void ) : int
abstract public getFile ( void ) : string
abstract public getLine ( void ) : int
abstract public getTrace ( void ) : array
abstract public getTraceAsString ( void ) : string
abstract public getPrevious ( void ) : Throwable
abstract public __toString ( void ) : string
}

目次