Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8311146

Improve error message for template processors in jshell

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • tools
    • None

      ```
      jshell> FormatProcessor.FMT."\{return;}"
      Exception in thread "main" java.lang.InternalError: Exception during parse - java.lang.AssertionError
              at jdk.jshell/jdk.jshell.TaskFactory$ParseTask.parse(TaskFactory.java:381)
      ...
      Caused by: java.lang.IllegalStateException: java.lang.AssertionError
              at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.parse(JavacTaskImpl.java:252)
              at jdk.jshell/jdk.jshell.TaskFactory$ParseTask.parse(TaskFactory.java:379)
              ... 24 more
      Caused by: java.lang.AssertionError
              at jdk.compiler/com.sun.tools.javac.util.Assert.error(Assert.java:155)
              at jdk.compiler/com.sun.tools.javac.util.Assert.check(Assert.java:46)
              at jdk.compiler/com.sun.tools.javac.parser.JavacParser.reportSyntaxError(JavacParser.java:492)
      ...
      ```

            Unassigned Unassigned
            cstein Christian Stein
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: