docs: function _DockerRegistryClientBaseError() {
      var ctor = this.constructor;
      assert.string(ctor.prototype.code, ctor.name + '.prototype.code');
  
      /*
       * In versions of node since (I think) 0.10, `Error.toString()` does
       * not use `this.constructor.name`. Therefore to get that error subclass
       * name in printed errors and error.stack, we need to set `prototype.name`.
       */
      if (!ctor.prototype.hasOwnProperty('name')) {
          ctor.prototype.name = ctor.name;
      }
  
      var vargs = [];
      var fields;
      var msgArgs;
      if (arguments[0] instanceof Error) {
          // `new <Error>(<err>, ...)`
          vargs.push(arguments[0]); // cause
          if (arguments.length === 1) {
              msgArgs = ['error'];
          } else {
              msgArgs = Array.prototype.slice.call(arguments, 1);
          }
      } else if (typeof (arguments[0]) !== 'object' && arguments[0] !== null ||
              Array.isArray(arguments[0])) {
          // `new <Error>(msg, ...)`
          fields = null;
          msgArgs = Array.prototype.slice.call(arguments);
      } else if (Buffer.isBuffer(arguments[0])) {
          // `new <Error>(buf, ...)`
          // Almost certainly an error, show `inspect(buf)`. See bunyan#35.
          fields = null;
          msgArgs = Array.prototype.slice.call(arguments);
          msgArgs[0] = util.inspect(msgArgs[0]);
      } else {
          // `new <Error>(fields, msg, ...)`
          fields = arguments[0];
          if (fields.err) {
              vargs.push(fields.err); // cause
              delete fields.err;
          }
          msgArgs = Array.prototype.slice.call(arguments, 1);
      }
  
      // HACK: Workaround silly printf-handling in verror s.t. a message with
      // content that looks like a printf code breaks its rendering.
      vargs.push('%s');
      vargs.push(format.apply(null, msgArgs));
      VError.apply(this, vargs);
  
      if (fields) {
          var self = this;
          Object.keys(fields).forEach(function (name) {
              self[name] = fields[name];
          });
      }
  
  }