TurboCommons-Java/.turboBuilder/Utils.js
function echoWarningsAndErrors(antWarnings, antErrors){
	
	//Define the echo task to use for warnings and errors
	var echo = project.createTask("echo");
	var error = new org.apache.tools.ant.taskdefs.Echo.EchoLevel();
	error.setValue("error");
	echo.setLevel(error);

	//Display all the detected warnings
	for(var i = 0; i < antWarnings.length; i++){

		echo.setMessage("WARNING: " + antWarnings[i]);
		echo.perform();
	}

	//Display all the detected errors
	for(i = 0; i < antErrors.length; i++){

		echo.setMessage("ERROR: " + antErrors[i]);
		echo.perform();
	}

	//Set a failure to the ant build if errors are present
	if(antErrors.length > 0){

		project.setProperty("javascript.fail.message", "Source analisis detected errors.");
	}
}
function echoWarningsAndErrors(antWarnings, antErrors){
	
	//Define the echo task to use for warnings and errors
	var echo = project.createTask("echo");
	var error = new org.apache.tools.ant.taskdefs.Echo.EchoLevel();
	error.setValue("error");
	echo.setLevel(error);

	//Display all the detected warnings
	for(var i = 0; i < antWarnings.length; i++){

		echo.setMessage("WARNING: " + antWarnings[i]);
		echo.perform();
	}

	//Display all the detected errors
	for(i = 0; i < antErrors.length; i++){

		echo.setMessage("ERROR: " + antErrors[i]);
		echo.perform();
	}

	//Set a failure to the ant build if errors are present
	if(antErrors.length > 0){

		project.setProperty("javascript.fail.message", "Source analisis detected errors.");
	}
}
function echoWarningsAndErrors ( antWarnings , antErrors ) { //Define the echo task to use for warnings and errors
 var echo = project . createTask ( "echo" ) ; var error = new org . apache . tools . ant . taskdefs . Echo . EchoLevel ( ) ; error . setValue ( "error" ) ; echo . setLevel ( error ) ; //Display all the detected warnings
 for ( var i = 0 ; i < antWarnings . length ; i ++ ) { echo . setMessage ( "WARNING: " + antWarnings [ i ] ) ; echo . perform ( ) ; } //Display all the detected errors
 for ( i = 0 ; i < antErrors . length ; i ++ ) { echo . setMessage ( "ERROR: " + antErrors [ i ] ) ; echo . perform ( ) ; } //Set a failure to the ant build if errors are present
 if ( antErrors . length > 0 ) { project . setProperty ( "javascript.fail.message" , "Source analisis detected errors." ) ; } }
Output to ant console the warnings and errors if exist
Output to ant console the warnings and errors if exist