Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content

Send crash from worker to Sentry

Vincent Bourgmayer requested to merge 1398-catch-issue-in-workers into main

Description

Make Workers to report crash log to sentry

Screenshots

Technical details

We set up a try catch in all doWork() method of worker class to send logs to Sentry through Timber.

I don't implemented an abstract worker class as an extra layer between real workers and Worker's parent class. The reason is that not all the worker should return same Result in case of failure.

and because I didn't find how to override doWork() in this extra class that would call doWork() in subclass. Or I would have to define an abstract method that would be called in the doWork() of the extra class. And then move the code in subclass from "doWork()" method to the new abstract method's implementation.

Tests

Issues

https://gitlab.e.foundation/e/os/backlog/-/issues/1398

10 commandments of code reviews

👪 https://gitlab.e.foundation/internal/wiki/-/wikis/mobile-team/guidelines/Code-review

Merge request reports

Loading