private void OnExceptionFromTry(NativeActivityFaultContext context, Exception propagatedException, System.Activities.ActivityInstance propagatedFrom)
 {
     if (propagatedFrom.IsCancellationRequested)
     {
         if (TD.TryCatchExceptionDuringCancelationIsEnabled())
         {
             TD.TryCatchExceptionDuringCancelation(base.DisplayName);
         }
         context.Abort(propagatedException);
         context.HandleFault();
     }
     else if (this.FindCatch(propagatedException) != null)
     {
         if (TD.TryCatchExceptionFromTryIsEnabled())
         {
             TD.TryCatchExceptionFromTry(base.DisplayName, propagatedException.GetType().ToString());
         }
         context.CancelChild(propagatedFrom);
         this.state.Get(context).CaughtException = context.CreateFaultContext();
         context.HandleFault();
     }
 }