[Issue 2034] New - error message for invalid directory name is unclear

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Issue 2034] New - error message for invalid directory name is unclear

pdsimanyi
https://hudson.dev.java.net/issues/show_bug.cgi?id=2034
                 Issue #|2034
                 Summary|error message for invalid directory name is unclear
               Component|hudson
                 Version|current
                Platform|All
              OS/Version|All
                     URL|
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|ENHANCEMENT
                Priority|P5
            Subcomponent|master-slave
             Assigned to|issues@hudson
             Reported by|pdsimanyi






------- Additional comments from [hidden email] Mon Jul  7 21:42:36 +0000 2008 -------
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.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]