If I understand you correctly, you should proceed like with any other 
application. Which is: propagate errors to the GUI in order to make the 
user aware of the problem. But only under following conditions:

* The user expects an immediate result but the action failed
* The app cannot recover from that problem and requires the user's 
attention (like activating GPS, inserting SD card, corrupt / unformatted SD 
card etc.)

If it is something the app can automatically recover from, do not bother 
the user at all. Typical scenarios are failed synchronization / download / 
upload attempts. Even in severe cases like data loss, if your app is able 
to fully restore the data "from the cloud" or a local backup I would not 
bother the user at all with these details. Stay silent and create a smooth 
and painless user experience.

Most users are not interested in (problem) details anyway and they'd click 
away your notifications without reading them.

You also should silently log all errors into a file. Provide a "support" 
feature that attaches the log file to an email. It's also a good idea to 
override the uncaught exception handler in order to log uncaught exceptions 
(but don't forget to invoke the default handler after logging, otherwise 
you won't get the "app crash" dialog).

On Wednesday, November 21, 2012 12:53:04 PM UTC-6, Luiz Henrique wrote:
>
> Hi Guys,
>
> what is the best approach in a android application to handle 
> Catch-Exceptions (java.lang.Exception) on the business layer?
>
> Cheers,
> Luiz
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to