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

Make ValueObservation error handling mandatory #728

Merged
merged 3 commits into from
Mar 10, 2020

Conversation

groue
Copy link
Owner

@groue groue commented Mar 10, 2020

Hiding database errors from user's sight was not a good idea.

// BEFORE: GRDB 4
do {
    try observation.start(in: dbQueue) { value in
        print("fresh value: \(value)")
    }
} catch { ... }

// NEW: GRDB 5
observation.start(
    in: dbQueue,
    onError: { error in ... },
    onChange: { value in print("fresh value: \(value)") })

Hiding errors from user's sight was not a good idea
@groue groue added this to the GRDB 5 milestone Mar 10, 2020
@groue groue mentioned this pull request Mar 10, 2020
42 tasks
@groue groue merged commit e48b654 into GRDB5 Mar 10, 2020
@groue groue deleted the dev/ValueObservation-error-handling branch March 10, 2020 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant