Avoiding dependencies to third party libraries: Exceptions.(blog.dynamicprogrammer.com)
submitted by
hgarcia(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?
|category: ALT.NET
|Views: 4
tags:
ALT.NET Facade Patterns dependencies another
Everyones tags:
Your Tags: