<div dir="ltr">Hi,<br><div><br></div><div>We have created an <a href="https://code.vtiger.com/vtiger/vtigercrm/issues/1537">issue</a> here for exception handling, Please do update any further observations on similar exception handlings.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 4, 2020 at 1:30 PM Alan Lord <<a href="mailto:alanslists@gmail.com">alanslists@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 04/11/2020 03:37, Rubén A. Estrada Orozco wrote:<br>
> When you try to instantiate a record like so, for example:<br>
> <br>
> Vtiger_Record_Model::getInstanceById($id);<br>
> <br>
> the function CRMEntity::retrieve_entity_info throws exceptions when the <br>
> record is not in the db or was deleted:<br>
> <br>
> Those exceptions are too general and it seems that $app_strings is empty <br>
> (tested on vt 7.3). So you don't even get the message.<br>
<br>
wow - $app_strings went when v6 came out! Should be vtranslate('LABEL', <br>
$module);<br>
<br>
> Wouldn't it be better to create RecordNotFoundException and <br>
> RecordDeletedException ? So that we can catch them elsewhere? And if we <br>
> don't catch them, at least the exception name quickly gives you a hint <br>
> of the problem.<br>
<br>
+1<br>
<br>
Al<br>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">With<br>Best Regards<br>Uma.S<br><div>Vtiger Team</div></div></div>