Why is there a try! in the codebase?
Build Information
-
Include the SQLite.swift version, commit or branch experiencing the issue. 0.15.3
-
Mention Xcode and OS X versions affected. All
-
How do do you integrate SQLite.swift in your project?
- Swift Package manager
General guidelines
In Core/Statement.swift, this try! causes a crash on some of my users:
It happens when trying db.prepare. When the function is already throwable, it should be expected that it never fatally crashes the app, but rather throw an error which I could either catch or ignore.
That way I could act on the error. Otherwise this is not good for the UX. Would really appreciate any help!
Second this, I'm getting a crash right now due to this on a user's device, I assume it's a corrupt DB but the app still shouldn't crash.
any update?
Just fork it @xiushaomin
I can confirm: Also the linux version is affected. Catching errors is truly important for a reliable framework!