Recovery Scenario: Send Error Description in Email
I have created a recovery scenario which sends an email to a recipient whenever a script breaks or any run error occurs. The function is attached below.
Now I want the description of error to be sent as email body. I tried using Err.Description, but, it doesnt work. Is there any other way by which I can achieve this?
Function SendBreakNotification(Object, Method, Arguments, retVal)
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "SCRIPT BREAK"
objMessage.From = "Automation Administrator <firstname.lastname@example.org>"
objMessage.To = "email@example.com"
objMessage.TextBody = Err.Description