function makeError(id, msg, err, requireModules) {
        var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id);
        e.requireType = id;
        e.requireModules = requireModules;
        if (err) {
            e.originalError = err;
        }
        return e;
    }
Constructs an error with a pointer to an URL with more information.
@param {String} id the error ID that maps to an ID on a web page.
@param {String} message human readable error.
@param {Error} [err] the original error, if there is one.

@returns {Error}