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
Asked
Active
Viewed 523 times
1
-
1you should format every `}` at a new line, that way it's clearer for you to see if there are closing statements `}` missing. – Steven Jan 21 '21 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). – james Jan 22 '21 at 05:12