java.lang.Object
org.mozilla.javascript.tools.ToolErrorReporter
- All Implemented Interfaces:
org.mozilla.javascript.ErrorReporter
Error reporter for tools.
Currently used by both the shell and the compiler.
-
Constructor Summary
ConstructorsConstructorDescriptionToolErrorReporter(boolean reportWarnings) ToolErrorReporter(boolean reportWarnings, PrintStream err) -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic StringgetMessage(String messageId) Look up the message corresponding to messageId in the org.mozilla.javascript.tools.shell.resources.Messages property file.static StringgetMessage(String messageId, Object[] args) static StringgetMessage(String messageId, Object arg1, Object arg2) static StringgetMessage(String messageId, String argument) booleanbooleanstatic voidreportException(org.mozilla.javascript.ErrorReporter er, org.mozilla.javascript.RhinoException ex) voidreportException(org.mozilla.javascript.RhinoException ex) org.mozilla.javascript.EvaluatorExceptionruntimeError(String message, String sourceName, int line, String lineSource, int lineOffset) voidsetIsReportingWarnings(boolean reportWarnings) void
-
Constructor Details
-
ToolErrorReporter
public ToolErrorReporter(boolean reportWarnings) -
ToolErrorReporter
-
-
Method Details
-
getMessage
Look up the message corresponding to messageId in the org.mozilla.javascript.tools.shell.resources.Messages property file. For internationalization support. -
getMessage
-
getMessage
-
getMessage
-
warning
- Specified by:
warningin interfaceorg.mozilla.javascript.ErrorReporter
-
error
- Specified by:
errorin interfaceorg.mozilla.javascript.ErrorReporter
-
runtimeError
public org.mozilla.javascript.EvaluatorException runtimeError(String message, String sourceName, int line, String lineSource, int lineOffset) - Specified by:
runtimeErrorin interfaceorg.mozilla.javascript.ErrorReporter
-
hasReportedError
public boolean hasReportedError() -
isReportingWarnings
public boolean isReportingWarnings() -
setIsReportingWarnings
public void setIsReportingWarnings(boolean reportWarnings) -
reportException
public static void reportException(org.mozilla.javascript.ErrorReporter er, org.mozilla.javascript.RhinoException ex) -
reportException
public void reportException(org.mozilla.javascript.RhinoException ex)
-