You see here an Exception being returned to the caller. The updateVideoConsultation is an interface method. There could be implementations of this interface that do no parsing. That is why it is not recommendable that we return "technical" exceptions. We should return business exceptions.

As shown above, we need to return a Business exception. And for those implementations that do need to parse, a parsing excption can be wrappedinto the business exception.

As you see below, another advantage of returning business exception is that I don't have a cascade of catch exceptions blocks to handle like parseexception, filehandlingexception etc.


This free site is ad-supported. Learn more