Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-2034

error message for invalid directory name is unclear

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • remoting
    • None
    • Platform: All, OS: All

      The error message for an empty string as a directory name is unclear. This
      condition is reproduced by configuring a project, selecting "Advanced Project
      Options", clicking on "Use custom workspace", and not providing a "Directory"
      field. The UI for this does not issue any warning at configuration time. The
      only error occurs later, as a novice-unfriendly exception:

      FATAL: Failed to mkdirs:
      java.io.IOException: Failed to mkdirs:
      at hudson.FilePath.mkdirs(FilePath.java:378)

      The problem is that the failing directory name(s) is an empty string that
      follows "Failed to mkdirs:". The code generating this error follows:
      public void mkdirs() throws IOException, InterruptedException {
      [...deleted...]
      throw new IOException("Failed to mkdirs: "+remote);

      A simple way to clarify this is to enhance the IOException to include quotes
      around the directory names and be more explicit, e.g.

      "Failed to create these directories: \"" + remote + "\""

      (Where the quotes delimit the string, and make an empty string immediately obvious.)

      This is a minor issue, and I only mention it because it requires a novice user
      to have to download Hudson source code and review the exception details before
      understanding what failed.

      Thanks much.

            Unassigned Unassigned
            pdsimanyi pdsimanyi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: