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

Better context for some jlink exceptions

XMLWordPrintable

    • b145
    • generic
    • generic
    • Not verified

      As part of the supportability review for jlink JEP, I saw a few areas which we might be able to capture better context in the exceptions thrown.

      jdk/tools/jlink/internal/
      ImagePluginConfiguration.java:

              if (!Files.isDirectory(dirPath)) {
                  throw new IllegalArgumentException("Not a directory");
              }

      == print dirPath ?

      TaskHelper.java:

                      if (!Files.exists(path) || !Files.isDirectory(path)) {
                          throw newBadArgs("err.existing.image.must.exist");
                      }
      == print path ?

      jdk/tools/jlink/plugin
      ExecutableImage.java:
              if (!Files.exists(home)) {
                  throw new IllegalArgumentException("Invalid image home");
              }
      == print home ?

            jlaskey Jim Laskey
            coffeys Sean Coffey
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: