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

fix: Add exception inheritance for CppSQLite3Exception, harder try catch re-throw in exception handler #1544

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

EmosewaMC
Copy link
Collaborator

Allows this to be caught in our exception handler by name. Fixes the try catch re-throw to catch any exception if the exception re-thrown does not inherit std::exception.

Tested that replacing a dummy query.bind with a non-existent field

  • prints Caught unknown exception. when not inheriting from std::exception
  • prints SQLITE3_ERROR... when inheriting from std::exception

catch any exception just in case exception isnt inherited from
Copy link
Contributor

@Xiphoseer Xiphoseer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh 😅

@aronwk-aaron aronwk-aaron merged commit b8b2b68 into main Apr 10, 2024
4 checks passed
@aronwk-aaron aronwk-aaron deleted the sqlite-exceptions branch April 10, 2024 12:32
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 this pull request may close these issues.

3 participants