reject = function (message, log) {
        /**
         * Creates a wrappable Promise rejection function.
         *
         * Creates a function that returns a Promise.reject with a new WrappedError
         * that has the provided message and wraps the original error that
         * caused the promise to reject.
         */
        return function (error) {
            var wrapped_error = new WrappedError(message, error);
            if (log) console.error(wrapped_error);
            return Promise.reject(wrapped_error);
        };
    }
Resolve a promiseful dictionary.
Returns a single Promise.