mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 22:42:38 +01:00
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:
parent
148e29e1a4
commit
cbaf6ab1b1
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user