php istisnalar - biz birden atar olabilir?

0 Cevap php
    if ($disponivel === 0)
    {
        $razao = $check->cd->reason;
        $mensagem = "the domain isn't available. Reason: ".$razao;
    }
    elseif($disponivel === 1)
    {
        $mensagem = "the domain doesn't exist - free to register.";
    }

    return $mensagem;
}
else
{
    throw new EppCommandsExceptions('Domain isn't supported - '.$result->msg, $codigo);
}

Bu $ Mensagem dizeleri görüyor musunuz? Onlar da hata mesajları ve benim soru $ yerine Mensagem bazı hata mesajları gösterme sahip olduğunu, bunun yerine birkaç atış istisnaları kullanabilir?

Update: I DO NOT mean to throw the exceptions all at once. Each exception at his time.

Thanks in advance, MEM

0 Cevap