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

class Exception implements Throwable {
/* Özellikler */
protected string $message = "";
private string $string = "";
protected int $code;
protected string $file = "";
protected int $line;
private array $trace = [];
private ?Throwable $previous = null;
/* Yöntemler */
public __construct(string $message = "", int $code = 0, ?Throwable $previous = null)
final public getMessage(): string
final public getPrevious(): ?Throwable
final public getCode(): int
final public getFile(): string
final public getLine(): int
final public getTrace(): array
final public getTraceAsString(): string
public __toString(): 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