Added Error Handling code

Added a new parameter to SaveSectionDocument and Error Handling
Changed error handling for InvokeMember to throw an exception
Added code to change the view to PrintMode when determining length
This commit is contained in:
Rich
2010-04-21 20:55:28 +00:00
parent 1741b0e3e0
commit 2c14e4113b
4 changed files with 43 additions and 22 deletions

View File

@@ -71,7 +71,7 @@ namespace DataLoader
string thenum = num.ToString("d2");
fname = string.Format("{0}\\rtffiles\\{1}.A{2}", pth, ProcFileName, thenum);
Application.DoEvents();
SaveSectionDocument(fname, stpseq, SecType, ref Documentid);
SaveSectionDocument(fname, stpseq, SecType, ref Documentid, procitem.DisplayNumber + ":" + (Number == string.Empty ? Title : Number));
if (Documentid == 0)
{
if (MissingDocument==null) MissingDocument = Document.MakeDocument("MISSING FILE IN CONVERSION", null, null, null);
@@ -453,6 +453,8 @@ namespace DataLoader
}
}
Item secitem = AddSection(procitem, num, title, stype, dts, init, ci, step + sequence, fmt, libDocid, pth, FromItem, sectFormat);
if (secitem == null)
throw (new Exception("Null parameter in AddSection"));
thesectid = secitem.ItemID;
// if the editsectid hasn't been set yet, set it to this section id, i.e. the first