private void OnActionErrorOccurred(ActionErrorEventArgs args)
        {
            ActionErrorEvent handler = this.ActionErrorOccurred;

            if (handler != null)
            {
                handler(this, args);
            }
        }
        private ContinueState RunStep(IAction currentAction)
        {
            try
            {
                var args = new ActionEventArgs
                {
                    Action   = currentAction,
                    Stepping = this.IsStepping
                };

                this.OnBeforeAction(args);
                currentAction.Run();
                this.OnActionCompleted(args);

                return(ContinueState.Continue);
            }
            catch (FatalActionException e)
            {
                var args = new ActionErrorEventArgs
                {
                    Action    = currentAction,
                    Exception = new FatalActionException(
                        string.Format(Resources.CentipedeCore_RunJob_FatalError,
                                      e.Message,
                                      e)),
                    Fatal = true
                };
                this.OnActionErrorOccurred(args);
                throw new AbortOperationException();
            }
            catch (Exception e)
            {
                var args = new ActionErrorEventArgs
                {
                    Action    = currentAction,
                    Exception = (e as ActionException) ??
                                new ActionException(e, this.CurrentAction)
                };
                this.OnActionErrorOccurred(args);

                return(args.Continue);
            }
        }
Exemple #3
0
 private void OnActionFailedEvent(object sender, ActionErrorEventArgs args)
 {
     Log.ErrorFormat("Action evaluation failed. Action={0}, Message={1}", args.Action, args.Exception);
 }
 public static void OnActionFailedEvent(object sender, ActionErrorEventArgs e)
 {
     BagTMLog.LogDebug(
         String.Format("BagTM Engine Processing Rules Action Failed {0}", e.Action), sender);
 }