Skip to content

Why is there a try! in the codebase? #1290

@DanielEdrisian

Description

@DanielEdrisian

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:
Screenshot 2024-12-16 at 6 22 00 PM

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.
Screenshot 2024-12-16 at 6 28 32 PM

That way I could act on the error. Otherwise this is not good for the UX. Would really appreciate any help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions