1

I'm trying to find specific errors from Jenkins console output and print them by echo statement. For example, I made a missing in my closing statement " } "As shown in my pipeline script, which produces the error in Jenkins console output as : Expecting '}' found at line 1, column 23 So I need to print out the error with echo statement as shown : Output of error along with these which i have already done

2
  • 1
    you should format every } at a new line, that way it's clearer for you to see if there are closing statements } missing. Commented Jan 21, 2021 at 16:08
  • 2
    @Steven , i did that purposefully , my objective here is to output the error ,for example user must scroll all through the console output in jenkins to find the error ,hences to make things simple ,I just want to output the errors as a final output (with echo statements) .Try ,catch is one method ,yet it doesn't help eveytime (if you want i will point out an example). Commented Jan 22, 2021 at 5:12

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.