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

sqlitedb does not throw error #19764

Closed
despiegk opened this issue Nov 4, 2023 · 2 comments
Closed

sqlitedb does not throw error #19764

despiegk opened this issue Nov 4, 2023 · 2 comments
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@despiegk
Copy link
Contributor

despiegk commented Nov 4, 2023

Describe the bug

docu says:

fn (DB) exec [#](https://modules.vlang.io/db.sqlite.html#DB.exec)
fn (db &DB) exec(query string) ![]Row
exec executes the query on the given db, and returns an array of all the results, or an error on failure

if we execute a wrong query it prints an error but the error is not propagated

Reproduction Steps

use a sqlite db, open it and insert some data, make mistake in query, will not return error

Expected Behavior

throw error

Current Behavior

no errors

Possible Solution

No response

Additional Information/Context

No response

V version

latest

Environment details (OS name and version, etc.)

osx m1

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

@despiegk despiegk added the Bug This tag is applied to issues which reports bugs. label Nov 4, 2023
@despiegk
Copy link
Contributor Author

despiegk commented Nov 4, 2023

e.g
failed to query: db.sqlite.SQLError: no such table: mystruct_find (1) (SELECT oid FROM mystruct_find;); code: 1
create db & tables: d__mystruct
CREATE TABLE IF NOT EXISTS mystruct_data (
data BLOB,
oid INTEGER );

but program continued

@despiegk
Copy link
Contributor Author

despiegk commented Nov 4, 2023

sorry wrong report, mistake in my code

@despiegk despiegk closed this as completed Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs.
Projects
None yet
Development

No branches or pull requests

1 participant