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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user