When a file has bad JS, and your app initializes and tries to minify files, a hard CF error is thrown. Currently the compressJs() method of the YuiCompressor.cfc has the following:
try {
compressor = $loadJavaClass('com.yahoo.platform.yui.compressor.JavaScriptCompressor').init(input, reporter);
compressor.compress(output, javaCast('int', arguments.linebreak), javaCast('boolean', arguments.munge), javaCast('boolean',arguments.verbose), javaCast('boolean', arguments.preserveAllSemiColons), javaCast('boolean',arguments.disableOptimizations));
} catch('org.mozilla.javascript.EvaluatorException' e){
$throw(type="org.cfstatic.util.YuiCompressor.badJs", message="There was an error compressing your javascript: '#e.message#'. Please see the error detail for the problematic javascript source.", detail=arguments.source);
}
This doesn't catch the EvaluatorException, because that exception is nested in the call stack. The error thrown is of type 'Object' stating
An exception occurred while instantiating a Java object. The class must not be an interface or an abstract class. Error: ''.
That message has a Cause of error type 'java.lang.reflect.InvocationTargetException', with the message of [empty string]. This error has a Cause of type 'org.mozilla.javascript.EvaluatorException'.