[Vtigercrm-developers] exceptions are too general when record deleted or not found
Rubén A. Estrada Orozco
rulotec1 at gmail.com
Wed Nov 4 03:37:29 GMT 2020
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:
[image: image.png]
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.
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.
Saludos
Rubén
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20201103/1afefe8d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 34478 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20201103/1afefe8d/attachment-0001.png>
More information about the vtigercrm-developers
mailing list