/// <summary>
        /// Called when an exception is raised within the context of the execution of this instance.
        /// </summary>
        /// <param name="executionContext">The <see cref="T:System.Workflow.ComponentModel.ActivityExecutionContext"/> for this instance.</param>
        /// <param name="exception">The <see cref="T:System.Exception"/> that caused this fault.</param>
        /// <returns>
        /// The <see cref="T:System.Workflow.ComponentModel.ActivityExecutionStatus"/> resulting from an attempt to cancel this instance.
        /// </returns>
        /// <exception cref="T:System.ArgumentNullException">
        ///     <paramref name="executionContext"/> is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="T:System.ArgumentNullException">
        ///     <paramref name="exception"/> is a null reference (Nothing).</exception>
        protected override ActivityExecutionStatus HandleFault(ActivityExecutionContext executionContext, Exception exception)
        {
            SubSiteCreationException applicationException
                = new SubSiteCreationException("An error occurred during the Synchronize Status activity", exception);

            return(base.HandleFault(executionContext, applicationException));
        }
        /// <summary>
        /// Method that adds error information when an exception has occurred.
        /// </summary>
        /// <param name="executionContext"></param>
        /// <param name="exception"></param>
        /// <returns></returns>
        protected override ActivityExecutionStatus HandleFault(ActivityExecutionContext executionContext, Exception exception)
        {
            string errorMessage = string.Format(CultureInfo.CurrentCulture,
                                                Resources.ResolveSiteTemplateFaultMessage
                                                , exception.Message, this.BusinessEventName, this.SiteTemplateName, this.TopLevelSiteRelativeUrl, this.BusinessEventIdKey);

            SubSiteCreationException applicationException
                = new SubSiteCreationException(errorMessage, exception);

            return(base.HandleFault(executionContext, applicationException));
        }
Exemple #3
0
        /// <summary>
        /// Called when an exception is raised within the context of the execution of this instance.
        /// </summary>
        /// <param name="executionContext">The <see cref="T:System.Workflow.ComponentModel.ActivityExecutionContext"/> for this instance.</param>
        /// <param name="exception">The <see cref="T:System.Exception"/> that caused this fault.</param>
        /// <returns>
        /// The <see cref="T:System.Workflow.ComponentModel.ActivityExecutionStatus"/> resulting from an attempt to cancel this instance.
        /// </returns>
        /// <exception cref="T:System.ArgumentNullException">
        ///     <paramref name="executionContext"/> is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="T:System.ArgumentNullException">
        ///     <paramref name="exception"/> is a null reference (Nothing).</exception>
        protected override ActivityExecutionStatus HandleFault(ActivityExecutionContext executionContext, Exception exception)
        {
            SubSiteCreationException applicationException = new SubSiteCreationException(Resources.ErrorInCreateSubSiteActivity, exception);

            return(base.HandleFault(executionContext, applicationException));
        }