Added better error message if replace ocr list cannot be loaded

git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@1841 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
niksedk 2013-05-26 17:41:28 +00:00
parent 148e29e1a4
commit cbaf6ab1b1

View File

@ -92,7 +92,14 @@ namespace Nikse.SubtitleEdit.Logic.OCR
if (File.Exists(_replaceListXmlFileName))
{
var doc = new XmlDocument();
doc.Load(_replaceListXmlFileName);
try
{
doc.Load(_replaceListXmlFileName);
}
catch (Exception exception)
{
MessageBox.Show("Unable to load " + _replaceListXmlFileName + ": " + exception.Message + Environment.NewLine);
}
_wordReplaceList = LoadReplaceList(doc, "WholeWords");
_partialWordReplaceListAlways = LoadReplaceList(doc, "PartialWordsAlways");