mirror of
https://github.com/ente-io/ente.git
synced 2025-08-08 07:28:26 +00:00
[auth] Log error during init
This commit is contained in:
parent
0f63930e52
commit
4243a331a3
@ -33,6 +33,7 @@ import 'package:flutter_displaymode/flutter_displaymode.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:tray_manager/tray_manager.dart';
|
||||
import 'package:win32/win32.dart';
|
||||
import 'package:window_manager/window_manager.dart';
|
||||
|
||||
final _logger = Logger("main");
|
||||
@ -104,7 +105,12 @@ Future<void> _runInForeground() async {
|
||||
final savedThemeMode = _themeMode(await AdaptiveTheme.getThemeMode());
|
||||
return await _runWithLogs(() async {
|
||||
_logger.info("Starting app in foreground");
|
||||
await _init(false, via: 'mainMethod');
|
||||
try {
|
||||
await _init(false, via: 'mainMethod');
|
||||
} catch (e, s) {
|
||||
_logger.severe("Failed to init", e, s);
|
||||
rethrow;
|
||||
}
|
||||
final Locale? locale = await getLocale(noFallback: true);
|
||||
unawaited(UpdateService.instance.showUpdateNotification());
|
||||
runApp(
|
||||
@ -156,7 +162,7 @@ void _registerWindowsProtocol() {
|
||||
|
||||
Future<void> _init(bool bool, {String? via}) async {
|
||||
_registerWindowsProtocol();
|
||||
await initCryptoUtil();
|
||||
await CryptoUtil.init();
|
||||
|
||||
await PreferenceService.instance.init();
|
||||
await CodeStore.instance.init();
|
||||
|
Loading…
x
Reference in New Issue
Block a user