Category Archives: ATG

Again about already known but too useful as always

I got a chance to introduce some convention/design/best practices regarding exception handling in our Java EE/ATG project.

During some research to prove a concept I found some interested articles for me, hope might be useful for someone else.

Some conclusion that I made:

  • do not over-create too many custom exceptions;
  • do not over-use unchecked exceptions, even some too respectful persons are talking that checked exceptions are dead they still might be quite useful
  • pay attention regarding handling/re-throwing
  • do not bubble-up low-level API (wrap API you’re using to not to tie your clients)
  • pay attention to bounded contexts (DDD)
  • and the most hardest one – keep it simple