use of com.google.javascript.jscomp.DiagnosticType in project closure-compiler by google.
the class GwtRunner method toNativeErrorArray.
/**
* Convert a list of {@link JSError} instances to a JS array containing plain objects.
*/
private static JavaScriptObject[] toNativeErrorArray(List<JSError> errors) {
JavaScriptObject[] out = new JavaScriptObject[errors.size()];
for (int i = 0; i < errors.size(); ++i) {
JSError error = errors.get(i);
DiagnosticType type = error.getType();
out[i] = createError(error.sourceName, error.description, type != null ? type.key : null, error.lineNumber, error.getCharno());
}
return out;
}
Aggregations