bin/r.js
function includeFinished(value) {
            //If a sync build environment, check for errors here, instead of
            //in the then callback below, since some errors, like two IDs pointed
            //to same URL but only one anon ID will leave the loader in an
            //unresolved state since a setTimeout cannot be used to check for
            //timeout.
            var hasError = false;
            if (syncChecks[env.get()]) {
                try {
                    build.checkForErrors(context);
                } catch (e) {
                    hasError = true;
                    deferred.reject(e);
                }
            }

            if (!hasError) {
                deferred.resolve(value);
            }
        }
function includeFinished(value) {
            //If a sync build environment, check for errors here, instead of
            //in the then callback below, since some errors, like two IDs pointed
            //to same URL but only one anon ID will leave the loader in an
            //unresolved state since a setTimeout cannot be used to check for
            //timeout.
            var hasError = false;
            if (syncChecks[env.get()]) {
                try {
                    build.checkForErrors(context);
                } catch (e) {
                    hasError = true;
                    deferred.reject(e);
                }
            }

            if (!hasError) {
                deferred.resolve(value);
            }
        }
function includeFinished ( value ) { //If a sync build environment, check for errors here, instead of //in the then callback below, since some errors, like two IDs pointed //to same URL but only one anon ID will leave the loader in an //unresolved state since a setTimeout cannot be used to check for //timeout. var hasError = false ; if ( syncChecks [ env . get ( ) ] ) { try { build . checkForErrors ( context ) ; } catch ( e ) { hasError = true ; deferred . reject ( e ) ; } } if ( ! hasError ) { deferred . resolve ( value ) ; } }
Use a wrapping function so can check for errors.
Use a wrapping function so can check for errors .