src/aria/core/JsonValidator.js
function (errors, throwsErrors) {
                if (errors.length === 0) {
                    return true;
                }
                if (!throwsErrors) {
                    for (var i = 0; i < errors.length; i++) {
                        this.$logError(errors[i].msgId, errors[i].msgArgs);
                    }
                } else {
                    var error, logs = aria.core.Log;
                    // aria.core.Log may not be available
                    if (logs) {
                        var messages = [];
                        for (var i = 0; i < errors.length; i++) {
                            errors[i].message = logs.prepareLoggedMessage(errors[i].msgId, errors[i].msgArgs);
                            messages.push(errors[i].message);
                        }
                        error = new Error(messages.join('\n'));
                    } else {
                        error = new Error();
                    }
                    error.errors = errors;
                    throw error;
                }
                return false;
            }
function (errors, throwsErrors) {
                if (errors.length === 0) {
                    return true;
                }
                if (!throwsErrors) {
                    for (var i = 0; i < errors.length; i++) {
                        this.$logError(errors[i].msgId, errors[i].msgArgs);
                    }
                } else {
                    var error, logs = aria.core.Log;
                    // aria.core.Log may not be available
                    if (logs) {
                        var messages = [];
                        for (var i = 0; i < errors.length; i++) {
                            errors[i].message = logs.prepareLoggedMessage(errors[i].msgId, errors[i].msgArgs);
                            messages.push(errors[i].message);
                        }
                        error = new Error(messages.join('\n'));
                    } else {
                        error = new Error();
                    }
                    error.errors = errors;
                    throw error;
                }
                return false;
            }
function ( errors , throwsErrors ) { if ( errors . length === 0 ) { return true ; } if ( ! throwsErrors ) { for ( var i = 0 ; i < errors . length ; i ++ ) { this . $logError ( errors [ i ] . msgId , errors [ i ] . msgArgs ) ; } } else { var error , logs = aria . core . Log ; // aria.core.Log may not be available if ( logs ) { var messages = [ ] ; for ( var i = 0 ; i < errors . length ; i ++ ) { errors [ i ] . message = logs . prepareLoggedMessage ( errors [ i ] . msgId , errors [ i ] . msgArgs ) ; messages . push ( errors [ i ] . message ) ; } error = new Error ( messages . join ( '\n' ) ) ; } else { error = new Error ( ) ; } error . errors = errors ; throw error ; } return false ; }
Log all errors.
@param {Array} array of errors
@param {Boolean} throwsErrors (default false)
@return {Boolean} True if there were no error, false otherwise.
Log all errors .