howie_
10 years agoContributor
Clarification of how to suppress error logging
Hey Everyone,
I'm trying to perform an action that occassionally throws an error that I want to prevent from being logged. I've created an OnLogError handler, and can identify the event causing the error as per
this thread, but I'm not sure how to impliment Log.LockEvents().
function GeneralEvents_OnLogError(Sender, LogParams)
{
if(aqString.Find(LogParams.AdditionalText, "offendingObjectName") != -1)
{
//do something important here
}
}
I suspect that Log.LockEvents belongs in the body of the 'if' statement, but if that's the case, when am I supposed to unlock?
I'm trying to perform an action that occassionally throws an error that I want to prevent from being logged. I've created an OnLogError handler, and can identify the event causing the error as per
this thread, but I'm not sure how to impliment Log.LockEvents().
function GeneralEvents_OnLogError(Sender, LogParams)
{
if(aqString.Find(LogParams.AdditionalText, "offendingObjectName") != -1)
{
//do something important here
}
}
I suspect that Log.LockEvents belongs in the body of the 'if' statement, but if that's the case, when am I supposed to unlock?