Skip to content

Conversation

kcowolf
Copy link
Contributor

@kcowolf kcowolf commented Nov 12, 2020

Similar to Statement::tryExecuteStep(), allows calls to sqlite3_exec() with the caller assuming responsibility for checking and handling the returned status.

Similar to Statement::tryExecuteStep(), allows calls to sqlite3_exec()
with the caller assuming responsibility for checking and handling the
returned status.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 1d0d8fe on kcowolf:master into adb7e7c on SRombauts:master.

@SRombauts
Copy link
Owner

Hello!
I find this to be useful. But I am really hesitant about the name, since it doesn't convey exactly the fact that it doesn't deal with exceptions (quite the opposite with the "try" keyword)
Or is this a sort of naming convention I am unaware of?

@kcowolf
Copy link
Contributor Author

kcowolf commented Nov 25, 2020

I was trying to follow Statement::tryExecuteStep(), which similarly doesn't throw exceptions (compared to Statement::executeStep and Statement::exec, which do).

Also, C# has some "Try" functions which behave similarly. For example, int.TryParse() versus int.Parse(). int.TryParse() returns false if the string can't be parsed as an integer, while int.Parse() throws an exception. https://stackoverflow.com/questions/467613/parse-v-tryparse

I'd be fine with renaming it if you prefer, though. It just made sense to me based on the above.

@SRombauts SRombauts merged commit 845f315 into SRombauts:master Nov 25, 2020
@SRombauts
Copy link
Owner

Then it's settled, thank you!

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