Uploaded image for project: 'Couchbase PHP client library'
  1. Couchbase PHP client library
  2. PCBC-58

Couchbase.so - constructing Couchbase() doesn't throw an exception on connection error

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.0
    • Fix Version/s: None
    • Component/s: library
    • Security Level: Public
    • Labels:

      Description

      When constructing Couchbase() and it fails to connect, no exception is thrown, which results in that condition being impossible to be caught... It would be really helpful if the constructor could throw an exception...

      Steps to reproduce:

      1. shut down Couchbase server or provide invalid host
      2. wrap couchbase constructor in try..catch block, e.g.
      try

      { $cb = new Couchbase($host, $couchbase['username'], $couchbase['password'], $couchbase['bucket']); }

      catch(Exception $e)

      { // couldn't connect to couchbase error_log("cb error"); }

      3. notice how no exception is caught when couchbase fails to connect...

        Issue Links

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

          Activity

          mssteuer Michael Steuer created issue -
          jan Jan Lehnardt (Inactive) made changes -
          Field Original Value New Value
          Link This issue is duplicated by PCBC-70 [ PCBC-70 ]
          ingenthr Matt Ingenthron made changes -
          Assignee Jan Lehnardt [ jan ] Matt Ingenthron [ ingenthr ]
          ingenthr Matt Ingenthron made changes -
          Assignee Matt Ingenthron [ ingenthr ] Mark Nunberg [ mnunberg ]
          mnunberg Mark Nunberg made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Won't Fix [ 2 ]
          mnunberg Mark Nunberg made changes -
          Link This issue is duplicated by PCBC-134 [ PCBC-134 ]
          brett19 Brett Lawson made changes -
          Workflow jira [ 16386 ] Couchbase SDK Workflow [ 44276 ]

            People

            • Assignee:
              mnunberg Mark Nunberg
              Reporter:
              mssteuer Michael Steuer
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes