diff --git a/AsbCloudApp/Data/BackgroundWorkDto.cs b/AsbCloudApp/Data/BackgroundWorkDto.cs index 3374148c..500f818a 100644 --- a/AsbCloudApp/Data/BackgroundWorkDto.cs +++ b/AsbCloudApp/Data/BackgroundWorkDto.cs @@ -180,12 +180,12 @@ namespace AsbCloudApp.Data /// protected void SetStatusComplete() { + CountComplete++; if (CurrentState is null) return; LastComplete = new(CurrentState); CurrentState = null; - CountComplete++; Trace.TraceInformation($"{WorkNameForTrace} state: completed"); } @@ -194,12 +194,12 @@ namespace AsbCloudApp.Data /// protected void SetLastError(string errorMessage) { + CountErrors++; if (CurrentState is null) return; LastError = new LastErrorInfo(CurrentState, errorMessage); CurrentState = null; - CountErrors++; Trace.TraceError($"{WorkNameForTrace} throw exception[{CountErrors}]: {errorMessage}"); } }