Send mail when a createRecord or updateRecord function produce an error

Send mail when a createRecord or updateRecord function produce an error

Dear All,

Is there any way when the deluge functions zoho.crm.createRecord and zoho.crm.updateRecord produce any kind of  error then to automatically send me an email as 'alert' that something is going wrong with a record?

As for now we find by lack if something is going wrong with a record thats why we would like this kind of 'email validation'