Exception Sınıfı

(PHP 5, PHP 7, PHP 8)

Giriş

Exception tüm kullanıcı istisnaları için temel sınıftır.

Sınıf Sözdizimi

classExceptionimplementsThrowable {
protectedstring$message = "";
privatestring$string = "";
protectedint$code;
protectedstring$file = "";
protectedint$line;
privatearray$trace = [];
private?Throwable$previous = null;
public__construct(string$message = "", int$code = 0, ?Throwable$previous = null)
finalpublicgetMessage(): string
finalpublicgetPrevious(): ?Throwable
finalpublicgetCode(): int
finalpublicgetFile(): string
finalpublicgetLine(): int
finalpublicgetTrace(): array
finalpublicgetTraceAsString(): string
private__clone(): void
}

Özellikler

message

İstisna iletisi.

code

İstisna kodu.

file

İstisnanın oluştuğu dosyanın ismi.

line

İstisnanın oluştuğu satırın numarası.

previous

Yavrulanan önceki istisna.

string

Yığıt izinin dizgesel gösterimi.

trace

Dizi olarak yığıt izi.

İçindekiler

To Top