mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
#18674: Catching Index parsing exceptions
Work Items: 18674 --HG-- branch : 1.x
This commit is contained in:
@@ -29,9 +29,10 @@ namespace Orchard.Indexing.Models
|
||||
}
|
||||
|
||||
public static IndexSettings Parse(string content) {
|
||||
var doc = XDocument.Parse(content);
|
||||
|
||||
try {
|
||||
var doc = XDocument.Parse(content);
|
||||
|
||||
return new IndexSettings {
|
||||
Mode = (IndexingMode) Enum.Parse(typeof (IndexingMode), doc.Descendants(TagMode).First().Value),
|
||||
LastIndexedId = Int32.Parse(doc.Descendants(TagLastIndexedId).First().Value),
|
||||
|
Reference in New Issue
Block a user