Class ECMAErrors

java.lang.Object
com.oracle.js.parser.ECMAErrors

public final class ECMAErrors extends Object
Helper class to throw various standard "ECMA error" exceptions such as Error, ReferenceError, TypeError etc.
  • Method Details

    • getMessage

      public static String getMessage(String msgId, String... args)
      Get the exception message by placing the args in the resource defined by the resource tag. This is visible to, e.g. the Parser can use it to generate compile time messages with the correct locale
      Parameters:
      msgId - the resource tag (message id)
      args - arguments to error string
      Returns:
      the filled out error string