org.olengski.optimize
public class MojoErrorReporter extends Object implements org.mozilla.javascript.ErrorReporter
| Constructor and Description |
|---|
MojoErrorReporter(org.apache.maven.plugin.logging.Log log,
boolean acceptWarnings)
Create a new error reporter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
error(String message,
String sourceName,
int line,
String lineSource,
int lineOffset)
Report an error.
|
int |
getErrorCnt() |
int |
getWarningCnt() |
org.mozilla.javascript.EvaluatorException |
runtimeError(String message,
String sourceName,
int line,
String lineSource,
int lineOffset)
Report an runtime error.
|
void |
setDefaultFileName(String filename)
Set the default filename to report errors against.
|
void |
warning(String message,
String sourceName,
int line,
String lineSource,
int lineOffset)
Report an warning.
|
public MojoErrorReporter(org.apache.maven.plugin.logging.Log log,
boolean acceptWarnings)
log - the log for the executing mojoacceptWarnings - whether or not to report warningspublic void setDefaultFileName(String filename)
filename - the filename to usepublic void error(String message, String sourceName, int line, String lineSource, int lineOffset)
error in interface org.mozilla.javascript.ErrorReportermessage - the error messagesourceName - the name of the source the error occurred inline - the line number the error occurred onlineSource - the contents of the line the error occurred onlineOffset - the position in the line where the error occurredpublic org.mozilla.javascript.EvaluatorException runtimeError(String message, String sourceName, int line, String lineSource, int lineOffset)
runtimeError in interface org.mozilla.javascript.ErrorReportermessage - the runtime error messagesourceName - the name of the source the runtime error occurred inline - the line number the runtime error occurred onlineSource - the contents of the line the runtime error occurred onlineOffset - the position in the line where the runtime error occurredpublic void warning(String message, String sourceName, int line, String lineSource, int lineOffset)
warning in interface org.mozilla.javascript.ErrorReportermessage - the warning messagesourceName - the name of the source the warning occurred inline - the line number the warning occurred onlineSource - the contents of the line the warning occurred onlineOffset - the position in the line where the warning occurredpublic int getErrorCnt()
public int getWarningCnt()
Copyright © 2015. All rights reserved.