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

Better error message when class is not part of the schema #680

Closed
cmelchior opened this issue Feb 14, 2022 · 1 comment
Closed

Better error message when class is not part of the schema #680

cmelchior opened this issue Feb 14, 2022 · 1 comment
Assignees

Comments

@cmelchior
Copy link
Contributor

cmelchior commented Feb 14, 2022

Right now the user is faced with something like:

   java.lang.IllegalArgumentException: Cannot find class: 'VisitInfo
        at io.realm.internal.interop.RealmInterop.classInfo(RealmInterop.kt:653)
        at io.realm.internal.interop.RealmInterop.realm_query_parse(RealmInterop.kt:670)
        at io.realm.internal.query.ObjectQuery$parseQuery$1.invoke(ObjectQuery.kt:153)
        at io.realm.internal.query.ObjectQuery$parseQuery$1.invoke(ObjectQuery.kt:152)
        at io.realm.internal.query.ObjectQuery.tryCatchCoreException(ObjectQuery.kt:162)
        at io.realm.internal.query.ObjectQuery.parseQuery(ObjectQuery.kt:152)
        at io.realm.internal.query.ObjectQuery.<init>(ObjectQuery.kt:52)
        at io.realm.internal.BaseRealmImpl.query(BaseRealmImpl.kt:82)

Instead, we should be more explicit, perhaps: "Cannot find class 'VisitInfo'. Has the class been added to the schema for the realm?`

@nhachicha
Copy link
Collaborator

fixed via #698

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants