diff --git a/PROMS/DataLoader/TextConvert.cs b/PROMS/DataLoader/TextConvert.cs index 51d985c5..88bcd041 100644 --- a/PROMS/DataLoader/TextConvert.cs +++ b/PROMS/DataLoader/TextConvert.cs @@ -215,9 +215,17 @@ namespace DataLoader public static string ConvertDOSSuperAndSubScripts(string instr) { - string retval = Regex.Replace(instr, "[#](.*?)[#]", "\\up2 $1\\up0 ");// DOS Superscript - retval = Regex.Replace(retval, "[~](.*?)[~]", "\\dn2 $1\\up0 ");// DOS Subscript - return retval; + try + { + string retval = Regex.Replace(instr, "[#](.*?)[#]", "\\up2 $1\\up0 ");// DOS Superscript + retval = Regex.Replace(retval, "[~](.*?)[~]", "\\dn2 $1\\up0 ");// DOS Subscript + return retval; + } + catch (Exception ex) + { + Console.WriteLine("Error in ConvertDOSSuperAndSubScripts"); + } + return ""; } private static string FixFortranNumber(Match match) {