Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error/exception notifications for the user #69

Open
Robbendebiene opened this issue May 4, 2022 · 2 comments
Open

Add error/exception notifications for the user #69

Robbendebiene opened this issue May 4, 2022 · 2 comments

Comments

@Robbendebiene
Copy link
Member

Robbendebiene commented May 4, 2022

Currently at lot of errors and exceptions are just swallowed in the code. (those places are marked with a TODO)
The goal of this issue is to add meaningful error messages (e.g. as toasts) that inform the user about what went wrong.

Resources:

@7h30n3
Copy link
Member

7h30n3 commented Aug 8, 2022

Some messages were added in a0b767a

@Robbendebiene
Copy link
Member Author

Missing error messages are:

  • OSMAuthenticatedUserProvider on login/logout
  • StopAreasProvider when loading stop areas

We could write a global error handler class/function that either contains all error messages with their respective errors or just handles and catches all uncaught errors (Unbekannter Fehler).

Option one would allow us to have less duplicated code for errors that can occur in multiple places like timeouts.
Also we do not have to write a try catch for every single place. Instead we handle them globally using one method
The disadvantage is that it becomes more obscure how the code will perform on an error.
So maybe we should start with option two (handle all uncaught errors)

Example using Flutters error handler: https://stackoverflow.com/questions/67762290/how-to-catch-async-exception-in-one-place-like-main-and-show-it-in-alertdialog
This also eliminates the problem of correctly retrieving the scaffold state/context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants