safeUpdateAsyncOrThrow<T> static method
Execute an async function safely, throwing if error occurs
Implementation
static Future<T> safeUpdateAsyncOrThrow<T>(
Future<T> Function() update,
) async {
try {
return await update();
} catch (e, stackTrace) {
Logger.error('Async state update error (throwing)', e);
Logger.debug('Stack trace', stackTrace);
rethrow;
}
}