Better message

This commit is contained in:
2022-03-10 18:29:07 -07:00
parent e476b14a54
commit 1e9c485a65
2 changed files with 16 additions and 9 deletions

View File

@ -282,10 +282,11 @@ public class ProcessData : IProcessData
double deviation = standardDeviation * 3;
double upper = average + deviation;
double lower = average - deviation;
string message = $"average:{average};sum:{sum};standardDeviation:{standardDeviation};upper:{upper};lower:{lower};TotalDelta:{TotalDelta};Text:{Text};previousTotalDeltaCollection.Count:{previousTotalDeltaCollection.Count};";
if (TotalDelta > upper)
throw new Exception();
throw new Exception(message);
if (TotalDelta < lower)
throw new Exception();
throw new Exception(message);
}
previousTotalDeltaCollection.Add(TotalDelta);
_Details.Add(Text);