This PR closes #22159.

I created a FailureAnalyzer that analyzes exceptions of type liquibase.exception.ChangeLogParseException in case they are triggered by a FileNotFoundException and shows a message accordingly.

I don't consider this PR final because I do have some more questions and remarks: - In order to satisfy the checkStyle I had to add a @since Javadoc tag, I didn't know what to put there so I put 2.4.0 as a guess. - I think that the FailureAnalysis would be even better if it would tell the user at which path it is looking for the changelog, however I couldn't figure out the best way to get a hold of this path in the LiquibaseChangelogMissingFailureAnalyzer class. - If needed I will also add a test class to test the functionality of the new FailureAnalyzer added in this PR.

Comment From: wilkinsona

Thanks very much, @fernandezseb. This is looking good.

In order to satisfy the checkStyle I had to add a @since Javadoc tag, I didn't know what to put there so I put 2.4.0 as a guess.

Thanks. 2.4.0 sounds good to me.

I think that the FailureAnalysis would be even better if it would tell the user at which path it is looking for the changelog, however I couldn't figure out the best way to get a hold of this path in the LiquibaseChangelogMissingFailureAnalyzer class.

I think we can probably extract it from the exception's message. The message should be Error parsing <<location>> so it should be possible to strip off Error parsing and be left with the location.

If needed I will also add a test class to test the functionality of the new FailureAnalyzer added in this PR.

Yes, please. Some tests would be much appreciated. It would be good to verify that extracting the path from the message works as expected. That should allow us to catch any changes that Liquibase make in the future that would break the extraction.

Comment From: fernandezseb

Thanks for the feedback @wilkinsona!

In the meantime I made some changes: - Added the path where liquibase is looking for the changelog file to the description. - Added a test case that attempts to create SpringLiquibase in order to trigger the error from the Liquibase. - Changed the access modifier from the FailureAnalyzer to package-private from public, thus not requiring the @since tag anymore in the Javadoc, so I also removed this.

Comment From: wilkinsona

Thanks very much, @fernandezseb.