ricksonmenezes posted: " 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"
Respond to this post by replying above this line
New post on Trying to post some tech ideas that enthused me.
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.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.