Fix bugs
This commit is contained in:
@@ -137,7 +137,7 @@ class CoreFacadeImpl with ExceptionHandler, InfraLogger implements CoreFacade {
|
|||||||
}).toList();
|
}).toList();
|
||||||
}).handleExceptions(
|
}).handleExceptions(
|
||||||
(error, stackTrace) {
|
(error, stackTrace) {
|
||||||
loggy.warning("error watching outbounds", error, stackTrace);
|
loggy.error("error watching outbounds", error, stackTrace);
|
||||||
return CoreServiceFailure.unexpected(error, stackTrace);
|
return CoreServiceFailure.unexpected(error, stackTrace);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class ProfilesRepositoryImpl
|
|||||||
Stream<Either<ProfileFailure, Profile?>> watchActiveProfile() {
|
Stream<Either<ProfileFailure, Profile?>> watchActiveProfile() {
|
||||||
return profilesDao.watchActiveProfile().handleExceptions(
|
return profilesDao.watchActiveProfile().handleExceptions(
|
||||||
(error, stackTrace) {
|
(error, stackTrace) {
|
||||||
loggy.warning("error watching active profile", error, stackTrace);
|
loggy.error("error watching active profile", error, stackTrace);
|
||||||
return ProfileUnexpectedFailure(error, stackTrace);
|
return ProfileUnexpectedFailure(error, stackTrace);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -109,15 +109,16 @@ class AboutPage extends HookConsumerWidget {
|
|||||||
.check();
|
.check();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
ListTile(
|
if (PlatformUtils.isDesktop)
|
||||||
title: Text(t.settings.general.openWorkingDir),
|
ListTile(
|
||||||
trailing: const Icon(Icons.arrow_outward_outlined),
|
title: Text(t.settings.general.openWorkingDir),
|
||||||
onTap: () async {
|
trailing: const Icon(Icons.arrow_outward_outlined),
|
||||||
final path =
|
onTap: () async {
|
||||||
ref.read(filesEditorServiceProvider).workingDir.uri;
|
final path =
|
||||||
await UriUtils.tryLaunch(path);
|
ref.read(filesEditorServiceProvider).workingDir.uri;
|
||||||
},
|
await UriUtils.tryLaunch(path);
|
||||||
),
|
},
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ class IntroPage extends HookConsumerWidget with PresLogger {
|
|||||||
try {
|
try {
|
||||||
await Sentry.close();
|
await Sentry.close();
|
||||||
} catch (error, stackTrace) {
|
} catch (error, stackTrace) {
|
||||||
loggy.warning(
|
loggy.error(
|
||||||
"could not disable analytics",
|
"could not disable analytics",
|
||||||
error,
|
error,
|
||||||
stackTrace,
|
stackTrace,
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ class ProxiesNotifier extends _$ProxiesNotifier with AppLogger {
|
|||||||
loggy.debug("testing group: [$groupTag]");
|
loggy.debug("testing group: [$groupTag]");
|
||||||
if (state case AsyncData()) {
|
if (state case AsyncData()) {
|
||||||
await ref.read(coreFacadeProvider).urlTest(groupTag).getOrElse((err) {
|
await ref.read(coreFacadeProvider).urlTest(groupTag).getOrElse((err) {
|
||||||
loggy.warning("error testing group", err);
|
loggy.error("error testing group", err);
|
||||||
throw err;
|
throw err;
|
||||||
}).run();
|
}).run();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ Future<List<InstalledPackageInfo>> installedPackagesInfo(
|
|||||||
.watch(platformSettingsProvider)
|
.watch(platformSettingsProvider)
|
||||||
.getInstalledPackages()
|
.getInstalledPackages()
|
||||||
.getOrElse((err) {
|
.getOrElse((err) {
|
||||||
_logger.warning("error getting installed packages", err);
|
_logger.error("error getting installed packages", err);
|
||||||
throw err;
|
throw err;
|
||||||
}).run();
|
}).run();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ class FFISingboxService
|
|||||||
_logger.debug("stopping status command client");
|
_logger.debug("stopping status command client");
|
||||||
final err = _box.stopCommandClient(1).cast<Utf8>().toDartString();
|
final err = _box.stopCommandClient(1).cast<Utf8>().toDartString();
|
||||||
if (err.isNotEmpty) {
|
if (err.isNotEmpty) {
|
||||||
_logger.warning("error stopping status client");
|
_logger.error("error stopping status client");
|
||||||
}
|
}
|
||||||
receiver.close();
|
receiver.close();
|
||||||
_statusStream = null;
|
_statusStream = null;
|
||||||
@@ -200,12 +200,12 @@ class FFISingboxService
|
|||||||
(event) {
|
(event) {
|
||||||
if (event case String _) {
|
if (event case String _) {
|
||||||
if (event.startsWith('error:')) {
|
if (event.startsWith('error:')) {
|
||||||
loggy.warning("[status client] error received: $event");
|
loggy.error("[status client] error received: $event");
|
||||||
throw event.replaceFirst('error:', "");
|
throw event.replaceFirst('error:', "");
|
||||||
}
|
}
|
||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
loggy.warning("[status client] unexpected type, msg: $event");
|
loggy.error("[status client] unexpected type, msg: $event");
|
||||||
throw "invalid type";
|
throw "invalid type";
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@@ -215,7 +215,7 @@ class FFISingboxService
|
|||||||
.cast<Utf8>()
|
.cast<Utf8>()
|
||||||
.toDartString();
|
.toDartString();
|
||||||
if (err.isNotEmpty) {
|
if (err.isNotEmpty) {
|
||||||
loggy.warning("error starting status command: $err");
|
loggy.error("error starting status command: $err");
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,7 +231,7 @@ class FFISingboxService
|
|||||||
_logger.debug("stopping group command client");
|
_logger.debug("stopping group command client");
|
||||||
final err = _box.stopCommandClient(4).cast<Utf8>().toDartString();
|
final err = _box.stopCommandClient(4).cast<Utf8>().toDartString();
|
||||||
if (err.isNotEmpty) {
|
if (err.isNotEmpty) {
|
||||||
_logger.warning("error stopping group client");
|
_logger.error("error stopping group client");
|
||||||
}
|
}
|
||||||
receiver.close();
|
receiver.close();
|
||||||
_groupsStream = null;
|
_groupsStream = null;
|
||||||
@@ -240,12 +240,12 @@ class FFISingboxService
|
|||||||
(event) {
|
(event) {
|
||||||
if (event case String _) {
|
if (event case String _) {
|
||||||
if (event.startsWith('error:')) {
|
if (event.startsWith('error:')) {
|
||||||
loggy.warning("[group client] error received: $event");
|
loggy.error("[group client] error received: $event");
|
||||||
throw event.replaceFirst('error:', "");
|
throw event.replaceFirst('error:', "");
|
||||||
}
|
}
|
||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
loggy.warning("[group client] unexpected type, msg: $event");
|
loggy.error("[group client] unexpected type, msg: $event");
|
||||||
throw "invalid type";
|
throw "invalid type";
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@@ -255,7 +255,7 @@ class FFISingboxService
|
|||||||
.cast<Utf8>()
|
.cast<Utf8>()
|
||||||
.toDartString();
|
.toDartString();
|
||||||
if (err.isNotEmpty) {
|
if (err.isNotEmpty) {
|
||||||
loggy.warning("error starting group command: $err");
|
loggy.error("error starting group command: $err");
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ class MobileSingboxService
|
|||||||
if (event case String _) {
|
if (event case String _) {
|
||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
loggy.warning("[group client] unexpected type, msg: $event");
|
loggy.error("[group client] unexpected type, msg: $event");
|
||||||
throw "invalid type";
|
throw "invalid type";
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ class SentryLoggyIntegration extends LoggyPrinter
|
|||||||
implements Integration<SentryOptions> {
|
implements Integration<SentryOptions> {
|
||||||
SentryLoggyIntegration({
|
SentryLoggyIntegration({
|
||||||
LogLevel minBreadcrumbLevel = LogLevel.info,
|
LogLevel minBreadcrumbLevel = LogLevel.info,
|
||||||
LogLevel minEventLevel = LogLevel.warning,
|
LogLevel minEventLevel = LogLevel.error,
|
||||||
}) : _minBreadcrumbLevel = minBreadcrumbLevel,
|
}) : _minBreadcrumbLevel = minBreadcrumbLevel,
|
||||||
_minEventLevel = minEventLevel;
|
_minEventLevel = minEventLevel;
|
||||||
|
|
||||||
|
|||||||
2
libcore
2
libcore
Submodule libcore updated: 75e342b6ba...dced5a30d0
Reference in New Issue
Block a user