mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Log text change. Change try place in the code to cover more.
This commit is contained in:
@@ -37,19 +37,20 @@ namespace Orchard.Alias.Recipes.Executors {
|
||||
foreach (var aliasElement in context.RecipeStep.Step.Elements()) {
|
||||
var aliasPath = aliasElement.Attribute("Path").Value;
|
||||
|
||||
Logger.Information("Processing alias '{0}'.", aliasPath);
|
||||
|
||||
var rvd = new RouteValueDictionary();
|
||||
|
||||
var routeValuesElement = aliasElement.Descendants("RouteValues").FirstOrDefault();
|
||||
|
||||
if (routeValuesElement != null) {
|
||||
foreach (var routeValue in routeValuesElement.Descendants("Add")) {
|
||||
rvd.Add(routeValue.Attribute("Key").Value, routeValue.Attribute("Value").Value);
|
||||
}
|
||||
}
|
||||
Logger.Information("Importing alias '{0}'.", aliasPath);
|
||||
|
||||
try {
|
||||
var rvd = new RouteValueDictionary();
|
||||
|
||||
var routeValuesElement = aliasElement.Descendants("RouteValues").FirstOrDefault();
|
||||
|
||||
if (routeValuesElement != null) {
|
||||
foreach (var routeValue in routeValuesElement.Descendants("Add")) {
|
||||
rvd.Add(routeValue.Attribute("Key").Value, routeValue.Attribute("Value").Value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
_aliasService.Set(aliasPath, rvd, "Custom", false);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user