Learn how to extend the functionality of a Jenkins pipeline to indicate whether a build passed or failed using the try-catch block and get the exception message for further analysis.