Add opt-in PostIt exception reporting
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
0ac6970e9d
commit
6839d9cac9
12 changed files with 165 additions and 13 deletions
|
|
@ -87,6 +87,7 @@ internal sealed class AndroidBackgroundChatService : IBackgroundChatService
|
|||
{
|
||||
Cancel(epoch);
|
||||
Log.Error("PostIt.Chat", ex.ToString());
|
||||
api.QueueExceptionReport(ex, "PostIt.Android.Chat");
|
||||
try
|
||||
{
|
||||
await AndroidSettings.UpdateAsync(api.Settings, s => s.SetActionStatus(ex.Message, StatusSeverity.Error))
|
||||
|
|
|
|||
|
|
@ -34,8 +34,11 @@ public sealed class ChatBootReceiver : BroadcastReceiver
|
|||
{
|
||||
Log.Error("PostIt.Chat", "Boot restart rejected: " + ex);
|
||||
if (api is not null)
|
||||
{
|
||||
api.QueueExceptionReport(ex, "PostIt.Android.Chat");
|
||||
AndroidSettings.ReportError(api.Settings,
|
||||
"Android a refuse le redemarrage de la messagerie : " + ex.Message);
|
||||
}
|
||||
}
|
||||
finally { pending?.Finish(); }
|
||||
});
|
||||
|
|
|
|||
|
|
@ -253,6 +253,7 @@ public sealed class ChatConnectionService : Service
|
|||
private void ReportError(Exception ex)
|
||||
{
|
||||
Log.Error("PostIt.Chat", ex.ToString());
|
||||
_api?.QueueExceptionReport(ex, "PostIt.Android.Chat");
|
||||
if (_api is not null) AndroidSettings.ReportError(_api.Settings, ex.Message);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue