/// <summary>
        /// Adds any exception message to the Order instance within the _Basket_Errors collection.
        /// Override this class to implement custom logging of pipeline exceptions.
        /// </summary>
        protected virtual void AddExceptionDetails(IDictionary order, Exception ex)
        {
            if (order == null)
            {
                throw new ArgumentNullException("order");
            }
            if (ex == null)
            {
                throw new ArgumentNullException("ex");
            }

            AddBasketErrorMessage(order, ex.Message);
        }
 /// <summary>
 /// Wraps the pipeline execution in a try-catch clause.
 /// </summary>
 protected virtual PipelineExecutionResult Execute(IDictionary order, object context, int flags)
 {
     try
     {
         Execute(new OrderAdapter(order));
         return(PipelineExecutionResult.Success);
     }
     catch (Exception ex)
     {
         AddExceptionDetails(order, ex);
         return(PipelineExecutionResult.Error);
     }
 }
        /// <summary>
        /// Adds a message to the Order instance within the _Basket_Errors collection.
        /// </summary>
        protected virtual void AddBasketErrorMessage(IDictionary order, string message)
        {
            object errorMessage = message;

            ((ISimpleList)order[OrderPipelineMappings.OrderForm.BasketErrors]).Add(ref errorMessage);
        }