Uploaded image for project: 'Couchbase C client library libcouchbase'
  1. Couchbase C client library libcouchbase
  2. CCBC-1159

LCB defines multiple errors with same code

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.0.1
    • None
    • None
    • None
    • 1

    Description

      See how many of them have the 702 code:

      /* View Error Definitions */ \
      X(LCB_ERR_VIEW_NOT_FOUND,               701, LCB_ERROR_TYPE_VIEW, 0, "View is not found") \
      X(LCB_ERR_DESIGN_DOCUMENT_NOT_FOUND,    702, LCB_ERROR_TYPE_VIEW, 0, "Design document is not found") \
      \
      /* Management API Error Definitions */ \
      X(LCB_ERR_COLLECTION_ALREADY_EXISTS,    701, LCB_ERROR_TYPE_MANAGEMENT, 0, "Collection already exists") \
      X(LCB_ERR_SCOPE_EXISTS,                 702, LCB_ERROR_TYPE_MANAGEMENT, 0, "Scope already exists") \
      X(LCB_ERR_USER_NOT_FOUND,               702, LCB_ERROR_TYPE_MANAGEMENT, 0, "User is not found") \
      X(LCB_ERR_GROUP_NOT_FOUND,              702, LCB_ERROR_TYPE_MANAGEMENT, 0, "Group is not found") \
      X(LCB_ERR_BUCKET_ALREADY_EXISTS,        702, LCB_ERROR_TYPE_MANAGEMENT, 0, "Bucket already exists") \
      

      Funny enough I found this because rustc pattern match said it's an unreachable pattern. Yay for intelligent compilers

      Attachments

        For Gerrit Dashboard: CCBC-1159
        # Subject Branch Project Status CR V

        Activity

          People

            avsej Sergey Avseyev
            daschl Michael Nitschinger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty