feat: Implement centralized error handling with ErrorService; replace print statements with logging in services and blocs
feat: Add ErrorContent widget for displaying error messages in dialogs and bottom sheets refactor: Update GroupBloc and GroupRepository to utilize ErrorService for error logging refactor: Enhance user and trip services to log errors using ErrorService refactor: Clean up debug print statements in GroupContent and related components
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import 'package:firebase_auth/firebase_auth.dart';
|
||||
import 'package:google_sign_in_platform_interface/google_sign_in_platform_interface.dart';
|
||||
import 'package:travel_mate/services/error_service.dart';
|
||||
|
||||
class AuthService {
|
||||
final _errorService = ErrorService();
|
||||
final FirebaseAuth firebaseAuth = FirebaseAuth.instance;
|
||||
|
||||
User? get currentUser => firebaseAuth.currentUser;
|
||||
@@ -89,13 +91,13 @@ class AuthService {
|
||||
}
|
||||
|
||||
} on GoogleSignInException catch (e) {
|
||||
print('Erreur lors de l\'initialisation de Google Sign-In: $e');
|
||||
_errorService.logError('Erreur Google Sign-In: $e', StackTrace.current);
|
||||
rethrow;
|
||||
} on FirebaseAuthException catch (e) {
|
||||
print('Erreur Firebase lors de l\'initialisation de Google Sign-In: $e');
|
||||
_errorService.logError('Erreur Firebase lors de l\'initialisation de Google Sign-In: $e', StackTrace.current);
|
||||
rethrow;
|
||||
} catch (e) {
|
||||
print('Erreur inconnue lors de l\'initialisation de Google Sign-In: $e');
|
||||
_errorService.logError('Erreur inconnue lors de l\'initialisation de Google Sign-In: $e', StackTrace.current);
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user