Jul 11, 2019 01:55 AM|Wei Zhang|LINK
According to your description, I suggest you could write you logic in application_ error method in Gloab.asax and then you could catch the detail about error and send an email about error message.
You could write as below:
void Application_Error(object sender, EventArgs e)
Exception objErr = Server.GetLastError().GetBaseException();
string err = "<br><b>Error in: </b>" + Request.Url.ToString() +
"<br><b>Error Message: </b>" + objErr.Message.ToString() +
"<br><b>Stack Trace:</b><br>" + objErr.StackTrace.ToString();
//Email sending method
Email.Send("email@example.com", "Error", err, true);
Here is the link I hope it could help you.