stop method
Removes every container, in reverse order; all are tried, and the first error is rethrown at the end.
Implementation
Future<void> stop() async {
Object? first;
StackTrace? trace;
for (final name in containers.keys.toList().reversed) {
try {
await _container(name).stop();
} on Object catch (error, stackTrace) {
first ??= error;
trace ??= stackTrace;
}
}
if (first != null) {
Error.throwWithStackTrace(first, trace!);
}
}