Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library-wise exception type #830

Open
fuzzah opened this issue Apr 16, 2024 · 2 comments
Open

Library-wise exception type #830

fuzzah opened this issue Apr 16, 2024 · 2 comments

Comments

@fuzzah
Copy link

fuzzah commented Apr 16, 2024

Please consider declaring a common exception type for the library (like SharpCompressException) and inheriting all specific exception types from it instead of subclassing base Exception class in different places.
It would improve user experience, as now users need to catch (Exception) which could mask actual errors such as hypothetical NullReferenceException in SharpCompress or exceptions thrown from some unrelated code residing in the same try block.

@adamhathcock
Copy link
Owner

Sounds good

@adamhathcock
Copy link
Owner

Base exception:
SharpCompressException from ApplicationException

Need to see what other exceptions I define as there seem to be some specific ones but mostly using framework ones

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants