Added Error Handling and Reporting
This commit is contained in:
@@ -64,6 +64,7 @@ namespace DataLoader
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
frmMain.AddError(ex,"Error converting transition type '{0}'",dr["TYPE"].ToString());
|
||||
log.Error("Error converting transition type");
|
||||
log.ErrorFormat("type from database = {0}", dr["TYPE"].ToString());
|
||||
log.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException);
|
||||
@@ -167,6 +168,7 @@ namespace DataLoader
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
frmMain.AddError(ex, "Error addition transition record");
|
||||
log.Error("Error addition transition record");
|
||||
log.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException);
|
||||
}
|
||||
@@ -204,6 +206,7 @@ namespace DataLoader
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
frmMain.AddError(ex, "Error getting transitions '{0}' '{1}'", ProcNumber, seqcvt);
|
||||
log.Error("Error getting transitions");
|
||||
log.ErrorFormat("from number = {0} oldstepsequence = {1}", ProcNumber, seqcvt);
|
||||
log.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException);
|
||||
@@ -269,10 +272,11 @@ namespace DataLoader
|
||||
private void ShowMissingTransitions()
|
||||
{
|
||||
if (dicTrans_ItemIds.Keys.Count > 0)
|
||||
log.Warn("Missing Transitions from Dictionary");
|
||||
//log.Warn("Missing Transitions from Dictionary");
|
||||
foreach (string s in dicTrans_ItemIds.Keys)
|
||||
{
|
||||
log.WarnFormat("{0} - {1}", s, dicTrans_ItemIds[s]);
|
||||
//log.WarnFormat("{0} - {1}", s, dicTrans_ItemIds[s]);
|
||||
frmMain.AddError("Missing Transition Destination {0} - {1}", s, dicTrans_ItemIds[s].ItemID);
|
||||
//AddItemAnnotation(dicTrans_ItemIds[s]);
|
||||
}
|
||||
foreach (string s in dicTrans_MigrationErrors.Keys)
|
||||
|
Reference in New Issue
Block a user