com.google.gwt.dev.js.rhino
Interface ErrorReporter


public interface ErrorReporter

This is interface defines a protocol for the reporting of errors during JavaScript translation or execution.


Method Summary
 void error(java.lang.String message, CodePosition startPosition, CodePosition endPosition)
          Report an error.
 void warning(java.lang.String message, CodePosition startPosition, CodePosition endPosition)
          Report a warning.
 

Method Detail

warning

void warning(@NotNull
             java.lang.String message,
             @NotNull
             CodePosition startPosition,
             @NotNull
             CodePosition endPosition)
Report a warning. The implementing class may choose to ignore the warning if it desires.

Parameters:
message - a String describing the error
startPosition - position before error token
endPosition - position after error token

error

void error(@NotNull
           java.lang.String message,
           @NotNull
           CodePosition startPosition,
           @NotNull
           CodePosition endPosition)
Report an error. The implementing class is free to throw an exception if it desires. If execution has not yet begun, the JavaScript engine is free to find additional errors rather than terminating the translation. It will not execute a script that had errors, however.

Parameters:
message - a String describing the error
startPosition - position before error token
endPosition - position after error token