Forum Discussion
kirk_bottomley
12 years agoContributor
Using the Locked property, I created an error handler for OnLogError events.
function GeneralEvents_OnLogError(Sender, LogParams)
{
if (LogParams.MessageText == "The window was destroyed during method execution.")
{
Log.Message(LogParams.MessageText)
LogParams.Locked = true
}
}
I still log the message, but the logs don't show a failure. The only problem now is, if a window is destroyed unintentionally, I won't see the failure immediately, but I'll still see the "window destroyed" message in the logs where I'm not expecting to see it, so it's not a complete loss.
If anyone has a better suggestion, I'm open to them. Otherwise, I will note this as closed and move on.
function GeneralEvents_OnLogError(Sender, LogParams)
{
if (LogParams.MessageText == "The window was destroyed during method execution.")
{
Log.Message(LogParams.MessageText)
LogParams.Locked = true
}
}
I still log the message, but the logs don't show a failure. The only problem now is, if a window is destroyed unintentionally, I won't see the failure immediately, but I'll still see the "window destroyed" message in the logs where I'm not expecting to see it, so it's not a complete loss.
If anyone has a better suggestion, I'm open to them. Otherwise, I will note this as closed and move on.