try
{
// Hata üretebilecek kod kısmı
} catch ( Exception $istisna )
{
echo $istisna->getMessage();
}


... ile hata yönetimi yapabilirsiniz.