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

Errors should be decoupled from the backing storage #18

Closed
sirioz opened this issue Aug 27, 2017 · 2 comments
Closed

Errors should be decoupled from the backing storage #18

sirioz opened this issue Aug 27, 2017 · 2 comments

Comments

@sirioz
Copy link
Contributor

sirioz commented Aug 27, 2017

Hi,

I think that error handling should be decoupled from the backing storage.
Now if I want to catch errors I need to reintroduce a dependancy to a Realm or CoreData.

Example:

do {
            try storage.mainContext?.add(user)
        } catch (let error) // this error depends on the backing storage module

@MarcoSantarossa
Copy link
Contributor

Hi @sirioz,
You're perfectly right. In our TODO backlog, we have the task to add a common interface for the errors of both Realm and CoreData. At the moment, we are catching several errors internally but we don't expose because we have to define a common and clean interface to use for any kind of storage we are going to support. We didn't start to work on it yet and I'm not able to provide a date for this feature. Since you have shown us that it has a quite high priority, we are going to prioritize it and start working on it asap.

We can leave this issue open to keep track since I guess other people are interesting on it.

@MarcoSantarossa
Copy link
Contributor

Issues fixed with #23. Thank you @sirioz for being our main contributor 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants