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

Inappropriate message when processor throws Error.

    XMLWordPrintable

    Details

    • Subcomponent:
      apt
    • Resolved In Build:
      b43
    • CPU:
      sparc
    • OS:
      solaris_9

      Description

      In apt/main/Main.java, there are a couple of places where all errors
      and exceptions are caught and dealt with, along the lines of:

      } catch (OutOfMemoryError ex) {
      resourceMessage(ex);
      return EXIT_SYSERR;
      } catch (StackOverflowError ex) {
      resourceMessage(ex);
      return EXIT_SYSERR;
      } catch (FatalError ex) {
      feMessage(ex);
      return EXIT_SYSERR;
      } catch (Throwable ex) {
      bugMessage(ex);
      return EXIT_ABNORMAL;
      } finally {

      We need to sanity-check each of these possibilities, to make sure it's
      doing something appropriate. One problem I noticed is if an annotation
      processor throws an error (perhaps an assertion failure), the tool writes
      this inappropriate message to stderr:

      An exception has occurred in the compiler (1.5.0-internal). Please
      file a bug at the Java Developer Connection
      (http://java.sun.com/cgi-bin/bugreport.cgi) after checking the Bug
      Parade for duplicates. Include your program and the following
      diagnostic in your report. Thank you.

      This particular message comes from the bugMessage method, but there are
      a number of similar methods that should be checked too.

        Attachments

          Activity

            People

            Assignee:
            darcy Joe Darcy
            Reporter:
            sseligmasunw Scott Seligman (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: