On Wed, Nov 21, 2012 at 2:31 PM, Luiz Henrique <[email protected]> wrote: > Hey Guys, > > I would like to remove the try/catch blocks from my business layer > (exception like java.lang.Exception). Is there some approach like AOP where > you can define an interceptor and can use an unique method to handle catch > exceptions?
This is hardly ACRA related, so maybe take it SO or a similar general purpose forum. AOP only works if you are doing basically the same thing, for example logging or re-throwing exceptions. If that is the only thing you need, ACRA will so the job. For 'business logic' though, there will probably be 'business' specific exception that you need to handle, and only your business classes will have the knowledge about how to do so. > > Basically my idea is turn my business layer as clear as it possible. > It all depends on your definition of 'clear' and is generally a broad topic. As I said, one way is to use RuntimeExceptions for everything and only handle them at the outermost layer (i.e, activities or services). That may or may not work well with your current design though. -- 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

