Skip to content

Commit b92ae06

Browse files
committed
Refactor error handling order in Future.cs to improve clarity and maintainability
1 parent c792d82 commit b92ae06

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Assets/_PackageRoot/Runtime/Future/Future.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,8 @@ void IFutureInternal<T>.FailToLoad(Exception exception)
216216
if (LogLevel.IsActive(DebugLevel.Error))
217217
Debug.LogError(exception.Message);
218218

219-
Safe.Run(OnFailedToLoad, exception, LogLevel); // 2 Original order
220-
Safe.Run(OnCompleted, false, LogLevel);; // 3 Original order
221-
// Safe.RunCancel(cts, LogLevel); // 1 Original order
219+
Safe.Run(OnFailedToLoad, exception, LogLevel);
220+
Safe.Run(OnCompleted, false, LogLevel);
222221
Clear();
223222
}
224223
void IFutureInternal<T>.SetTimeout(TimeSpan duration) => timeout = duration;

0 commit comments

Comments
 (0)