Exception Handling not working?

Briefly, I have an SQLSelect statement nicely wrapped by a try…catch. If I make a bad statement (e.g. ask for a column not in the table), exception is not caught. App simply crashes. Both on simulator and device.

Anyone else experience this?

-Bob

Have you checked if db.Connect has been successful?

What I am doing is a simple query.

e.g. select name, key from people (not the exact query but close enough)

This works. I get the list of people. What I did to check the exception handling is just change the query to:

select name, keyXXX from people (note the Xs)

This should cause an exception. It’s not caught.

You need to check db.error and raise an exception yourself if that is what you want to do.

Or use something like Bob’s ActiveRecord.

It’s a known issue.
Will try to find the feedback case that lists this as fixed.

Are you using Xojo 2017r3?

Here’s the case: <https://xojo.com/issue/42747>
Will be fixed in Xojo 2018r1

Yes this is a fix I’ve been looking forward to as well.