Gitea CI / Assemble and validate CI artifacts (push) Successful in 1m47s
Gitea CI / Check code and tests (push) Successful in 7m15s
Gitea CI / Build Android APK (push) Successful in 4m6s
Gitea CI / Build Windows x64 app (push) Successful in 3m34s
Gitea CI / Audit and package Windows x64 (push) Successful in 1m29s
Gitea CI / Gitea CI passed (push) Successful in 1s
Gitea Release / Prepare draft Release (push) Failing after 8s
Gitea Release / Upload Android to draft Release (push) Skipped
Gitea Release / Upload Windows to draft Release (push) Skipped
Gitea Release / Verify and publish Release (push) Skipped
17 lines
435 B
Dart
17 lines
435 B
Dart
import 'dart:async';
|
|
|
|
/// Release every owned resource, then report the first cleanup failure.
|
|
Future<void> completeCleanup(List<FutureOr<void> Function()> actions) async {
|
|
Object? failure;
|
|
StackTrace? trace;
|
|
for (final action in actions) {
|
|
try {
|
|
await action();
|
|
} catch (error, stack) {
|
|
failure ??= error;
|
|
trace ??= stack;
|
|
}
|
|
}
|
|
if (failure != null) Error.throwWithStackTrace(failure, trace!);
|
|
}
|