Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-25

Some (?) ReplicatorChange CouchbaseLiteExceptions contain no message

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0
    • Component/s: Java-Android
    • Security Level: Public
    • Labels:
      None

      Description

      I haven't exhaustively tested, but taking the below example of an unknown hostname, we get the error code of `5002` which maps to the correct error:

      https://github.com/couchbase/couchbase-lite-android/blob/677acb372ce407357eb54eaa41dc81e8b6f40832/shared/src/main/java/com/couchbase/lite/CBLError.java#L67

      However this should presumably be included in the `CouchbaseLiteException`, rather than requiring a look up of `5002`:

      ```
      ReplicatorChange{replicator=Replicator[<- Database@3379dd6

      {name='********'}

      URLEndpoint

      {url=ws://*****************:4984/********}

      ], status=Status{activityLevel=STOPPED, progress=Progress

      {completed=0, total=0}

      , error=CouchbaseLiteException

      {domain='CouchbaseLite', code=5002, msg=null}

      }}
      ```

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

          Hide
          jimb Jim Borden added a comment -

          Whoa, has this been sitting around for over a year?  If this is the case this is not a very hard fix to make, nor a big one.  Every error has a corresponding message in LiteCore already ripe for the picking via `c4error_getMessage`.  

          Show
          jimb Jim Borden added a comment - Whoa, has this been sitting around for over a year?  If this is the case this is not a very hard fix to make, nor a big one.  Every error has a corresponding message in LiteCore already ripe for the picking via `c4error_getMessage`.  
          Hide
          daniel.petersen Daniel Petersen added a comment -

          Should do this with our error message unification work.

          Show
          daniel.petersen Daniel Petersen added a comment - Should do this with our error message unification work.
          Hide
          blake.meike Blake Meike added a comment -

          It is no longer possible to create a CouchbaseLiteException without an error message. There are some corner cases that might cause an "Unknown Exception", but they should be pretty rare.

          Show
          blake.meike Blake Meike added a comment - It is no longer possible to create a CouchbaseLiteException without an error message. There are some corner cases that might cause an "Unknown Exception", but they should be pretty rare.
          Show
          blake.meike Blake Meike added a comment - fixed in https://github.com/couchbase/couchbase-lite-java/pull/174
          Hide
          blake.meike Blake Meike added a comment -

          Dan sez "close it"

          Show
          blake.meike Blake Meike added a comment - Dan sez "close it"

            People

            Assignee:
            The Lite The Lite
            Reporter:
            daniel.petersen Daniel Petersen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes

                  PagerDuty