As noted in other issues the error() step is not intended to print messages. But there are some use cases where this becomes very helpful. Eg. provides information directly in the blue ocean log; the error step does this sporadic only.

      Does it make sense to add another step with fails the build but also prints to the log?

          [JENKINS-58597] Additional Step error with message

          ethorsa added a comment -

          I have implemented a prototype of a new step. If there's interest I can contribute it.

          ethorsa added a comment - I have implemented a prototype of a new step. If there's interest I can contribute it.

          It would be helpful to have an option to print message directly to step log.

          Paweł Cieślak added a comment - It would be helpful to have an option to print message directly to step log.

            Unassigned Unassigned
            ethorsa ethorsa
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: