Uploaded image for project: 'Couchbase node.js Client Library'
  1. Couchbase node.js Client Library
  2. JSCBC-24

Errors not thrown from callback

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Major
    • 0.1.0
    • None
    • library
    • Security Level: Public
    • None
    • OSX 10.8.2
      Couchbase: 2.0.0 community edition (build-1976)
      Nodejs: v0.8.18 (install via homebrew)
      libcouchbase: 2.0.2 (installed via homebrew)
      couchbase node module: 0.0.11 (install via npm)

    Description

      I have been unable to get errors thrown from within the callbacks of the couchbase.get() or couchbase.set() to be reported up the chain. It looks like they are being 'eaten' connection connection.get() in bucket.js.

      see below for more info:

      var driver = require('couchbase');

      var config =

      { hosts : [ "localhost:8091" ], bucket : "default" }

      ;

      driver.connect(config, function(err, couchbase) {
      console.log("connected");
      couchbase.set("new", "something", function(err, meta)

      { console.log('before error'); throw ('error'); }

      );
      });

      and/or:

      var driver = require('couchbase');

      var config =

      { hosts : [ "localhost:8091" ], bucket : "default", debug : true }

      ;

      var test = function(callback)

      { callback(); }

      ;
      driver.connect(config, function(err, couchbase) {
      if (err)

      { throw (err); }

      couchbase.set("new", "something", function(err, meta) {
      couchbase.get("new", function(err, doc, meta)

      { console.log('before error'); throw (9); console.log('after error'); }

      );
      });
      test(function()

      { console.log('before error in test function'); //throw (99); console.log('after error test function'); }

      );
      });

      Attachments

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

        Activity

          People

            mnunberg Mark Nunberg (Inactive)
            balance.it David Mitchell
            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