Improved exception messages for SharedGroup::do_open

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintableJSON

      In SharedGroup::do_open(), there are following exception messages

      "Unsupported Realm file format version"
      "Expected a Realm without history"
      "Expected a Realm with no or in-realm history"
      "Expected an empty Realm or a Realm written by Realm Mobile Platform"
      "Expected a Realm containing a server-side history"
      "Unexpected future history schema version"
      "Nonupgradable history schema"
      

      However these exception messages don't contain the actual values that were found:

      "Unsupported Realm file format version: <file_format_version>"
      "Expected a Realm without history, but was <stored_hist_type>"
      "Expected a Realm with no or in-realm history. but was <stored_hist_type>"
      "Expected an empty Realm or a Realm written by Realm Mobile Platform, but was <stored_hist_type>, top ref <top_ref>"
      "Expected a Realm containing a server-side history, but was <stored_hist_type>, top ref <top_ref>"
      "Unexpected future history schema version: <stored_hist_schema_version>, <openers_hist_schema_version>"
      "Nonupgradable history schema: <stored_hist_schema_version>, <openers_hist_schema_version>"
      

      This would make resolving problems like https://github.com/realm/realm-java/issues/5175 easier

            Assignee:
            Mathias Stearn
            Reporter:
            Unito Sync Bot
            Archiver:
            Marc Greenfield

              Created:
              Updated:
              Resolved:
              Archived: