
public class CompilationProblemReporter extends Object
CompilationUnits to the
console.| Constructor and Description |
|---|
CompilationProblemReporter() |
| Modifier and Type | Method and Description |
|---|---|
static UnableToCompleteException |
logAndTranslateException(TreeLogger logger,
Throwable e)
Used as a convenience to catch all exceptions thrown by the compiler.
|
static void |
logMissingTypeErrorWithHints(TreeLogger logger,
String missingType,
CompilationState compilationState)
Provides a meaningful error message when a type is missing from the
TypeOracle or
CompilingClassLoader. |
static boolean |
reportErrors(TreeLogger logger,
CompilationUnit unit,
boolean suppressErrors)
Logs errors to the console.
|
public static UnableToCompleteException logAndTranslateException(TreeLogger logger, Throwable e)
InternalCompilerException, extra diagnostics are
printed.logger - logger used to report errors to the consolee - the exception to analyze and logUnableToCompleteException so
that the calling method can declare a more narrow 'throws
UnableToCompleteException'public static void logMissingTypeErrorWithHints(TreeLogger logger, String missingType, CompilationState compilationState)
TypeOracle or
CompilingClassLoader.logger - logger for logging errors to the consolemissingType - The qualified source name of the type to reportpublic static boolean reportErrors(TreeLogger logger, CompilationUnit unit, boolean suppressErrors)
logger - logger for reporting errors to the consoleunit - Compilation unit that may have errorssuppressErrors - Controls he log level for logging errors. If
false is passed, compilation errors are logged at
TreeLogger.ERROR and warnings logged at TreeLogger.WARN. If
true is passed, compilation errors are logged at
TreeLogger.TRACE and TreeLogger.DEBUG.true if an error was logged.Copyright © 2018. All rights reserved.