mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 02:07:39 +08:00
GitHostSetup: Log the errors in firebase
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
import 'package:fimber/fimber.dart';
|
import 'package:fimber/fimber.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:function_types/function_types.dart';
|
import 'package:function_types/function_types.dart';
|
||||||
|
import 'package:journal/analytics.dart';
|
||||||
import 'package:journal/apis/git.dart';
|
import 'package:journal/apis/git.dart';
|
||||||
import 'package:journal/apis/githost_factory.dart';
|
import 'package:journal/apis/githost_factory.dart';
|
||||||
import 'package:journal/settings.dart';
|
import 'package:journal/settings.dart';
|
||||||
@ -91,6 +92,12 @@ class GitHostSetupAutoConfigureState extends State<GitHostSetupAutoConfigure> {
|
|||||||
Fimber.d("GitHostSetupAutoConfigure: " + e.toString());
|
Fimber.d("GitHostSetupAutoConfigure: " + e.toString());
|
||||||
setState(() {
|
setState(() {
|
||||||
errorMessage = widget.gitHostType.toString() + ": " + e.toString();
|
errorMessage = widget.gitHostType.toString() + ": " + e.toString();
|
||||||
|
getAnalytics().logEvent(
|
||||||
|
name: "githostsetup_error",
|
||||||
|
parameters: <String, dynamic>{
|
||||||
|
'errorMessage': errorMessage,
|
||||||
|
},
|
||||||
|
);
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -101,6 +108,12 @@ class GitHostSetupAutoConfigureState extends State<GitHostSetupAutoConfigure> {
|
|||||||
Fimber.d("GitHostSetupAutoConfigure: " + e.toString());
|
Fimber.d("GitHostSetupAutoConfigure: " + e.toString());
|
||||||
setState(() {
|
setState(() {
|
||||||
errorMessage = widget.gitHostType.toString() + ": " + e.toString();
|
errorMessage = widget.gitHostType.toString() + ": " + e.toString();
|
||||||
|
getAnalytics().logEvent(
|
||||||
|
name: "githostsetup_error",
|
||||||
|
parameters: <String, dynamic>{
|
||||||
|
'errorMessage': errorMessage,
|
||||||
|
},
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user