mirror of
https://github.com/smmarty/friflex_flutter_starter.git
synced 2026-02-05 03:32:18 +00:00
feat(debug): Удалить Talker (#2)
Co-authored-by: petrovyuri <y.petrov@friflex.com>
This commit is contained in:
@@ -5,16 +5,24 @@ void _initErrorHandlers(IDebugService debugService) {
|
||||
// Обработка ошибок в приложении
|
||||
FlutterError.onError = (details) {
|
||||
_showErrorScreen();
|
||||
debugService.handleError(details.exception, details.stack,
|
||||
'FlutterError.onError: ${details.exceptionAsString()}',);
|
||||
debugService.logError(
|
||||
() => 'FlutterError.onError: ${details.exceptionAsString()}',
|
||||
error: details.exception,
|
||||
stackTrace: details.stack,
|
||||
);
|
||||
};
|
||||
// Обработка асинхронных ошибок в приложении
|
||||
PlatformDispatcher.instance.onError = (error, stack) {
|
||||
_showErrorScreen();
|
||||
debugService.handleError(error, stack, 'PlatformDispatcher: $error');
|
||||
debugService.logError(
|
||||
() => 'PlatformDispatcher.instance.onError',
|
||||
error: error,
|
||||
stackTrace: stack,
|
||||
);
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
/// Метод для показа экрана ошибки
|
||||
void _showErrorScreen() {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
|
||||
Reference in New Issue
Block a user