Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-292

Running a command against a server that no connection can be made against, shows weird exception message

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      When running:

      php -dextension=mongodb.so -r '$m = new MongoDB\Driver\Manager("mongodb://localhost:27017"); $c = new MongoDB\Driver\Command( [ "drop" => "test"] ); $m->executeCommand( "demo", $c );'
      

      And not having MongoDB running, the following exception is produced:

      Fatal error: Uncaught exception 'MongoDB\Driver\Exception\RuntimeException' with message 'Another cursor derived from this client is in exhaust.' in Command line code on line 1
      
      MongoDB\Driver\Exception\RuntimeException: Another cursor derived from this client is in exhaust. in Command line code on line 1
      
      Call Stack:
          0.0002     261472   1. {main}() Command line code:0
          0.0008     272104   2. MongoDB\Driver\Manager->executeCommand() Command line code:1
      

      Shouldn't it rather say it can't make a connection to mongodb://localhost:27017 ?

            Assignee:
            Unassigned Unassigned
            Reporter:
            derick Derick Rethans
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: