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

SqliteException doesn't appear to be catch-able even in release mode #56

Open
mark-summerfield opened this issue Mar 4, 2020 · 2 comments

Comments

@mark-summerfield
Copy link

The code in the tarball tries to catch SqliteExceptions but fails to do so even in release mode. This seems like a bug to me. I understand that some checking can be done at compile time but sometimes one wants to generate the SQL to be used at runtime and wants to catch any problems.
prob1.tar.gz

@AndrejMitrovic
Copy link
Contributor

Did you mean to say only instead of even? Because the issue that I see is that an assert is triggered in non-release mode:

https://github.com/biozic/d2sqlite3/blob/0280ef1769f0e0907980a241b9ac68e444a1fbd5/source/d2sqlite3/statement.d#L281

This is normal, because in -release mode asserts are removed, so you get the chance of catching the exception. assert is there to catch programming bugs.

@biozic
Copy link
Collaborator

biozic commented Jun 10, 2020

@mark-summerfield The assert is triggered before throwing an exception in non-release mode. But in release mode, an SqliteException should be triggered. Actually it is, on my machine with your own code. Did I miss something?

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

No branches or pull requests

3 participants