[Vtigercrm-developers] exceptions are too general when record deleted or not found
Uma S
uma.s at vtiger.com
Wed Nov 4 08:53:48 GMT 2020
Hi,
We have created an issue
<https://code.vtiger.com/vtiger/vtigercrm/issues/1537> here for exception
handling, Please do update any further observations on similar exception
handlings.
On Wed, Nov 4, 2020 at 1:30 PM Alan Lord <alanslists at gmail.com> wrote:
> On 04/11/2020 03:37, Rubén A. Estrada Orozco wrote:
> > When you try to instantiate a record like so, for example:
> >
> > Vtiger_Record_Model::getInstanceById($id);
> >
> > the function CRMEntity::retrieve_entity_info throws exceptions when the
> > record is not in the db or was deleted:
> >
> > Those exceptions are too general and it seems that $app_strings is empty
> > (tested on vt 7.3). So you don't even get the message.
>
> wow - $app_strings went when v6 came out! Should be vtranslate('LABEL',
> $module);
>
> > Wouldn't it be better to create RecordNotFoundException and
> > RecordDeletedException ? So that we can catch them elsewhere? And if we
> > don't catch them, at least the exception name quickly gives you a hint
> > of the problem.
>
> +1
>
> Al
> _______________________________________________
> http://www.vtiger.com/
--
With
Best Regards
Uma.S
Vtiger Team
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20201104/d24777ae/attachment.html>
More information about the vtigercrm-developers
mailing list