realm / realm-browser-osx

DEPRECATED - Realm Browser for Mac OS X has been replaced by realm-studio which is cross platform.
https://realm.io
502 stars 54 forks source link

Display contextual error message when Realm fails to open #240

Closed TimOliver closed 7 years ago

TimOliver commented 7 years ago

A regression seems to have occurred where the description string of an error for a Realm failing to be opened is no longer being displayed.

At the moment, if a Realm fails to open for any reason, only this generic message is supplied:

screen shot 2016-11-28 at 11 00 46 am

While it seems that the appropriate NSError object is being captured from Realm, it's not being passed up to this alert box properly. This is causing some confusion with certain users as to why a perfectly legitimate Realm file is otherwise not opening in the Browser (#237 and #239)

This appears to be easily fixed by adding an override for the presentError: method of the NSDocument class.