docs: function promiseWithError( err, callback) {
          var deferred = Q.defer();
          if ( err instanceof Error ) {
              deferred.reject( err);
          } else {
              deferred.reject(new Error(err));
          }
          if ( typeof callback === 'function' ) {
              callback(err, null);
          }
          return deferred.promise;
      }