Initial push to my private server

This commit is contained in:
Hamza-Ayed
2025-09-21 15:02:12 +03:00
parent 7e904ae460
commit f08ee61a7e
32 changed files with 1622 additions and 373 deletions

View File

@@ -144,14 +144,28 @@ void main() async {
DeviceOrientation.portraitDown,
]);
runZonedGuarded<Future<void>>(() async {
// ... الكود الحالي الموجود في دالة main ...
runApp(const MyApp());
}, (error, stack) {
// أي خطأ غير متوقع في التطبيق سيتم التقاطه هنا CRUD.
// ==== START: ERROR FILTER ====
String errorString = error.toString();
// Print all errors to the local debug console for development
print("Caught Dart error: $error");
print(stack);
// أرسل الخطأ إلى السيرفر
CRUD.addError(error.toString(), stack.toString(), 'main');
// We will check if the error contains keywords for errors we want to ignore.
// If it's one of them, we will NOT send it to the server.
bool isIgnoredError = errorString.contains('PERMISSION_DENIED') ||
errorString.contains('FormatException') ||
errorString.contains('Null check operator used on a null value');
if (!isIgnoredError) {
// Only send the error to the server if it's not in our ignore list.
CRUD.addError(error.toString(), stack.toString(), 'main');
} else {
print("Ignoring error and not sending to server: $errorString");
}
// ==== END: ERROR FILTER ====
});
}