Skip to content

Commit

Permalink
Merge pull request #723 from skadefro/master
Browse files Browse the repository at this point in the history
add try catch around MarkCanceled
  • Loading branch information
skadefro authored Nov 4, 2022
2 parents fa2946f + 705ae4b commit f84a7d5
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions OpenRPA/Activities/ForEachOf.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,14 @@ private void InternalExecute(NativeActivityContext context, ActivityInstance com
{
if ((completedInstance != null) && ((completedInstance.State == ActivityInstanceState.Canceled) || (context.IsCancellationRequested && (completedInstance.State == ActivityInstanceState.Faulted))))
{
context.MarkCanceled();
try
{
context.MarkCanceled();
}
catch (Exception ex)
{
Log.Debug(ex.ToString());
}
}
valueEnumerator.Dispose();
}
Expand All @@ -71,7 +78,14 @@ private void InternalExecute(NativeActivityContext context, ActivityInstance com
}
else
{
context.MarkCanceled();
try
{
context.MarkCanceled();
}
catch (Exception ex)
{
Log.Debug(ex.ToString());
}
valueEnumerator.Dispose();
}
}
Expand Down

0 comments on commit f84a7d5

Please sign in to comment.