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 committed 2010-04-21 20:55:28 +00:00
1 parent 1741b0e3e0
commit 2c14e4113b
4 files changed
+43 -22

No files matched your search

+1 -9
View File
@@ -42,15 +42,7 @@ namespace LBWordLibrary
}
catch (Exception ex)
{
StringBuilder sb = new StringBuilder();
sb.Append(string.Format("{0}.{1} {2} - {3}", _MyType.Name, name, bf.ToString(), ex.GetType().Name));
string prefix = "\r\n ";
do
{
sb.Append(prefix + ex.Message);
ex = ex.InnerException;
} while (ex != null);
Console.WriteLine(sb.ToString());
throw new Exception(string.Format("LBComObject.DoInvokeMember {0}.{1}", _MyType.Name, name), ex);
}
return null;
}