internal void OnError(TaskNode node, Exception exc, object item, ref bool stopProcessing)
{
if (Error != null)
{
ErrorEventArgs args = new ErrorEventArgs() { Error = exc, ProcessedItem=item, StopProcessing = stopProcessing, Node = node };
Error(this, args);
stopProcessing = args.StopProcessing;
}
else
{
stopProcessing = true;
}
if (stopProcessing) _stoppingException = exc;
}