opening realm db with same SyncConfiguration but diffrent error handler throw IllegalArgumentException
when i am tring to re-open realm database that allready have been closed using "Realm.getInstanceAsync" with same data but diffrent ErrorHandler, i am getting this exception "Configurations cannot be different if used to open the same file", why it make no sense to force the user to keep the same ErrorHandler reffrenece and share it in diffrent places that want to open synced realm database, the ErrorHandler has no effect on the way of working with the realm database it is just a listener
realm version:3.5.0
If your error handler implements hashCode/equals then it wouldn't matter.
@idok595 Why do you need a different error handler the 2nd time? The reasoning behind the current logic is that we see the SyncConfiguration/RealmConfiguration as the identifier for the Realm. This is also why it is immutable.
But like @Zhuinden says, a good workaround is implementing equals/hashcode in way that make your two error handlers equal.
ok thank,the issuse can be closed.