Make the default/error text for the 'FILE' token configurable

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      The FILE token does not allow to configure the text that occurs when the file does not exist. It'd be great if this were configurable for cases when this is a non-exceptional occurrence.

      Example:

      ${FILE, path="logs/warnings.html", filenotfoundmessage="No warnings were recorded in %f"}

      The current (2.35.1) error message would be implemented using this new parameter as follows:

      ${FILE, path="logs/warnings.html", filenotfoundmessage="ERROR: File '%f' does not exist"}

      This assumes there aren't any more error cases than just 'file not found'. Not sure if there are others. Alternatively, make it possible to mark a $FILE token as e.g. optional=true (so errors are discarded), and to provide a 'default text' like in JENKINS-20324.

            Assignee:
            Alex Earl
            Reporter:
            Daniel Beck
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: