Create an error snapshot if email template not found

I send daily attendance reminders to employees which requires an email template, How can I create an error snapshot if that is not found? I found this:
https://discuss.frappe.io/t/how-to-create-an-error-on-error-log-error-snapshot/18515
but how can this be implemented in my case?