The design of the application codebase is such that exceptions are raised all the way to the UI. All calls to the backend are facilitated by UseCases. Therefore wrapping all calls to UseCases will protect the application UI and user from crashes.
Given exceptions can result in unexpected behavior, we should let the user know that an exception has occurred. For now we should keep things simple and give a simple system styled error dialog to the user with a generic message and on "ok" button.
In addition to wrapping calls, we should put in place a system that will eventually allow exceptions to be Observable by backend systems. Typically this is done by logging to a pluggable logging system where a 3rd party observability suite can plugged in to receive crash and error logs.
Requirements
All calls to UseCases should be wrapped by try/catch mechanics.
All exceptions should be logged in a way that they logs can later be forwarded to an analytics system such as New Relic or Datadog (consider Timber or other similar pluggable systems.)
All exceptions cause a generic error dialog to be displayed.
Background
The design of the application codebase is such that exceptions are raised all the way to the UI. All calls to the backend are facilitated by
UseCases
. Therefore wrapping all calls toUseCases
will protect the application UI and user from crashes.Given exceptions can result in unexpected behavior, we should let the user know that an exception has occurred. For now we should keep things simple and give a simple system styled error dialog to the user with a generic message and on "ok" button.
In addition to wrapping calls, we should put in place a system that will eventually allow exceptions to be
Observable
by backend systems. Typically this is done by logging to a pluggable logging system where a 3rd party observability suite can plugged in to receive crash and error logs.Requirements
UseCases
should be wrapped by try/catch mechanics.