Added Error Handler to keep code from crashing when a partial replace word is not correctly formated.
This commit is contained in:
parent
8ee514f476
commit
35bed5b381
@ -1693,8 +1693,15 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
Text = myMatches.ReplaceMatches();
|
Text = myMatches.ReplaceMatches();
|
||||||
Text = Text.Replace(@"\xA0", @"\u160?"); //replace hard space
|
Text = Text.Replace(@"\xA0", @"\u160?"); //replace hard space
|
||||||
|
try
|
||||||
|
{
|
||||||
foreach (ReplaceStr prs in partialReplaceList)
|
foreach (ReplaceStr prs in partialReplaceList)
|
||||||
Text = Regex.Replace(Text, prs.ReplaceWord, prs.ReplaceWith);
|
Text = Regex.Replace(Text, prs.ReplaceWord, prs.ReplaceWith);
|
||||||
|
}
|
||||||
|
catch (Exception ex) // Don't crash on a format issue.
|
||||||
|
{
|
||||||
|
_MyLog.WarnFormat("{0} - {1}", ex.GetType().Name, ex.Message);
|
||||||
|
}
|
||||||
return Text;
|
return Text;
|
||||||
}
|
}
|
||||||
#region notused
|
#region notused
|
||||||
|
Loading…
x
Reference in New Issue
Block a user