dokan-dev / dokan-java

Dokan Java Wrapper
GNU Lesser General Public License v3.0
51 stars 28 forks source link

Reduce all exceptions to DokanyException only? #31

Open hrstoyanov opened 4 years ago

hrstoyanov commented 4 years ago

What if we eliminate LibraryNotFoundException, MountFailedException, UnmountFailedException and just use DokanyException - they are all essentially the same? This would shrink the dokan-java API surface further, but would probably need to be a major new version, as it is not backward compatible..

infeo commented 4 years ago

I'll agree with you, that the exceptions need a refactoring.

I like the suggestion made in this SO post to create an own exception class and either wrap all occuring exceptions or extend from this base class. Especially in the second case the developer can catch more specific exceptions if they want to, or just catch the generic one.