Exception

(PHP 5, PHP 7, PHP 8)

はじめに

Exception は、 すべてのユーザー例外の基底クラスです。

クラス概要

Exception implements Throwable {
/* プロパティ */
protected string $message ;
protected int $code ;
protected string $file ;
protected int $line ;
/* メソッド */
public __construct ( string $message = "" , int $code = 0 , Throwable $previous = null )
final public getMessage ( ) : string
final publicgetPrevious ( ) : Throwable|null
final public getCode ( ) : mixed
final public getFile ( ) : string
final public getLine ( ) : int
final public getTrace ( ) : array
final public getTraceAsString ( ) : string
public __toString ( ) : string
final private __clone ( ) : void
}

プロパティ

message

例外メッセージ

code

例外コード

file

例外が作られたファイル名

line

例外が作られた行

目次