Added Error Handling and Reporting
This commit is contained in:
@@ -143,6 +143,8 @@ namespace DataLoader
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
frmMain.AddError(ex, "AddStep {0}",stpseq);
|
||||
//Console.WriteLine("{0} {1}", ex.GetType().Name, ex.Message);
|
||||
log.Error("Save Step");
|
||||
log.ErrorFormat("oldstepsequence = {0}", stpseq);
|
||||
log.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException);
|
||||
@@ -208,7 +210,7 @@ namespace DataLoader
|
||||
if ((nxttok = tkstring.IndexOf("\x1")) > -1) // Comment
|
||||
{
|
||||
// add the comment to annotation table. Set type to comment.
|
||||
Console.WriteLine("Comment text: {0}", tkstring.Substring(nxttok + 1));
|
||||
log.InfoFormat("Comment text: {0}", tkstring.Substring(nxttok + 1));
|
||||
Annotation annot = Annotation.MakeAnnotation(item, CommentType, null, tkstring.Substring(nxttok + 1), null, dts, userid);
|
||||
}
|
||||
}
|
||||
@@ -239,6 +241,8 @@ namespace DataLoader
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//Console.WriteLine("Subtexts: {0} {1}", ex.GetType().Name, ex.Message);
|
||||
frmMain.AddError(ex, "AddStep 2 {0}", stpseq);
|
||||
log.Error("Save Step part 2");
|
||||
log.ErrorFormat("oldstepsequence = {0}", stpseq);
|
||||
log.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException);
|
||||
@@ -375,6 +379,8 @@ namespace DataLoader
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//Console.WriteLine("{0} {1}", ex.GetType().Name, ex.Message);
|
||||
frmMain.AddError(ex, "MigrateStep");
|
||||
log.Error("PROCESS STEP");
|
||||
log.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException);
|
||||
log.ErrorFormat(ex.StackTrace);
|
||||
|
Reference in New Issue
Block a user