Merge branch 'dev' into feature/update_well_operation_categories

This commit is contained in:
Никита Фролов 2023-11-23 15:48:11 +05:00
commit 0db60579a0

View File

@ -180,12 +180,12 @@ namespace AsbCloudApp.Data
/// </summary> /// </summary>
protected void SetStatusComplete() protected void SetStatusComplete()
{ {
CountComplete++;
if (CurrentState is null) if (CurrentState is null)
return; return;
LastComplete = new(CurrentState); LastComplete = new(CurrentState);
CurrentState = null; CurrentState = null;
CountComplete++;
Trace.TraceInformation($"{WorkNameForTrace} state: completed"); Trace.TraceInformation($"{WorkNameForTrace} state: completed");
} }
@ -194,12 +194,12 @@ namespace AsbCloudApp.Data
/// </summary> /// </summary>
protected void SetLastError(string errorMessage) protected void SetLastError(string errorMessage)
{ {
CountErrors++;
if (CurrentState is null) if (CurrentState is null)
return; return;
LastError = new LastErrorInfo(CurrentState, errorMessage); LastError = new LastErrorInfo(CurrentState, errorMessage);
CurrentState = null; CurrentState = null;
CountErrors++;
Trace.TraceError($"{WorkNameForTrace} throw exception[{CountErrors}]: {errorMessage}"); Trace.TraceError($"{WorkNameForTrace} throw exception[{CountErrors}]: {errorMessage}");
} }
} }