İstisna Tasarımı ve Özel Exception Sınıfları
Özel exception hiyerarşisi oluşturma, checked/unchecked ayrımı (PHP'de yok), exception handling stratejileri, global exception handler, hata günlükleme ve kullanıcıya güvenli hata mesajı sunma.
özel exception örneği
<?php
class DomainException extends \Exception {}
class NotFoundException extends DomainException {}
try {
throw new NotFoundException("Kayıt bulunamadı");
} catch (DomainException $e) {
// domain hatalarını ortak işle
}
?>