Add opt-in PostIt exception reporting

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Paul Schneider 2026-11-14 18:09:45 +00:00
commit 6839d9cac9
Signed by: notazof
GPG key ID: AD4B9B545FBD7D12
12 changed files with 165 additions and 13 deletions

View file

@ -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))

View file

@ -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(); }
});

View file

@ -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);
}