3 ms·
You question seems to be asked to look for one size fits all solution. There is no single solution. For example your database is down - only thing that you ca
by ozim 4y ago
You question seems to be asked to look for one size fits all solution.
There is no single solution.
For example your database is down - only thing that you can do is to show user error "please try again" - while you should have detailed logs in place to find why application cannot connect to database. Your program most likely cannot continue even on other screens so you most likely throw exception that should bubble up to reach interface and stop any execution.
Other scenario some third party api call failed - your user does not care and he wants to continue working, you probably want to show warning "you can continue but our systems cannot reach XYZ". So you don't want to throw an exception because you still want let user work on whatever they need. You still want to have it logged with all details to check what is the problem.