Giriş
PHP Manual
PHP Manual»Öntanımlı İstisnalar»Exception

Exception Sınıfı

(PHP 5, PHP 7, PHP 8)

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

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 function __construct(string $message = "", int $code = 0, ?Throwable $previous = null)
final public function getMessage(): string
final public function getPrevious(): ?Throwable
final public function getCode(): int
final public function getFile(): string
final public function getLine(): int
final public function getTrace(): array
final public function getTraceAsString(): string
public function __toString(): string
private function __clone(): void
}
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