Add more info to about the step that failed during an execution of a recipe.

--HG--
branch : dev
This commit is contained in:
Suha Can
2011-02-23 13:14:17 -08:00
parent bb0bc654b9
commit 35ec5469ac
2 changed files with 4 additions and 4 deletions

View File

@@ -39,14 +39,16 @@ namespace Orchard.Recipes.Services {
Logger.Error(exception, "Recipe execution {0} was cancelled because a step failed to execute", executionId);
while (_recipeStepQueue.Dequeue(executionId) != null) ;
_recipeJournal.ExecutionFailed(executionId);
return false;
throw new OrchardCoreException(T("Recipe execution with id {0} was cancelled because the \"{1}\" step failed to execute. The following exception was thrown: {2}. Refer to the recipe journal for more information.",
executionId, nextRecipeStep.Name, exception.Message));
}
if (!recipeContext.Executed) {
Logger.Error("Could not execute recipe step '{0}' because the recipe handler was not found.", recipeContext.RecipeStep.Name);
while (_recipeStepQueue.Dequeue(executionId) != null) ;
_recipeJournal.ExecutionFailed(executionId);
return false;
throw new OrchardCoreException(T("Recipe execution with id {0} was cancelled because the recipe handler for step \"{1}\" was not found. Refer to the recipe journal for more information.",
executionId, nextRecipeStep.Name));
}
return true;

View File

@@ -1,11 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using Orchard.Environment;
using Orchard.Environment.Configuration;
using Orchard.Logging;
using Orchard.Recipes.Models;
using Orchard.Setup.Services;
using Orchard.Setup.ViewModels;
using Orchard.Localization;