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

Let exceptions inherit standard exception classes with strings #31

Closed
eyalroz opened this issue May 29, 2022 · 1 comment · Fixed by #42
Closed

Let exceptions inherit standard exception classes with strings #31

eyalroz opened this issue May 29, 2022 · 1 comment · Fixed by #42

Comments

@eyalroz
Copy link
Contributor

eyalroz commented May 29, 2022

The exception class inherits directly from std::exception. But - your exceptions seem to be either runtime errors (file not found), or invalid arguments (e.g. passing a null extension) etc. So, inherit from the appropriate standard exception class. That would also remove the need for the base class with the string member - don't reinvent the wheel unless you have to.

@eyalroz
Copy link
Contributor Author

eyalroz commented May 29, 2022

Actually, consider #32 as well - it's not clear you even want custom exceptions at all.

@martin-olivier martin-olivier linked a pull request Jun 3, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants