mirror of
https://github.com/wgh136/pixes.git
synced 2025-09-27 12:57:24 +00:00
catch error
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import "dart:async";
|
||||
import "dart:ui";
|
||||
|
||||
import "package:dynamic_color/dynamic_color.dart";
|
||||
@@ -21,7 +22,8 @@ import "package:pixes/utils/translation.dart";
|
||||
import "package:pixes/utils/window.dart";
|
||||
import "package:window_manager/window_manager.dart";
|
||||
|
||||
void main() async {
|
||||
void main() {
|
||||
runZonedGuarded(() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
FlutterError.onError = (details) {
|
||||
Log.error("Unhandled", "${details.exception}\n${details.stack}");
|
||||
@@ -57,6 +59,9 @@ void main() async {
|
||||
Loop.start();
|
||||
Log.info("APP", "Application started");
|
||||
runApp(const MyApp());
|
||||
}, (error, stack) {
|
||||
Log.error("Unhandled Exception", "$error\n$stack");
|
||||
});
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
|
Reference in New Issue
Block a user