Avoiding dependencies to third party libraries: Exceptions.(blog.dynamicprogrammer.com)

submitted by hgarciahgarcia(1534) 3 years ago

You can use the facade pattern to isolate yourself from a third party library. The main benefit of doing this is that your client code won’t have a dependency on an interface defined by an external library, given you the desired flexibility to change the library that implements the logger later on. All your client code will keep using your abstraction. But what happens if the external library defines it’s own exceptions? What if one of this exceptions may be thrown during usage and you want to catch it and do something to fix the problem?

add a comment |category: |Views: 4

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story