This is a follow-up of #32775.

Looking at the current state of affairs, we could use an AotException that is similar in principle to BeansException. Reviewing the different parts where AOT could fail, and providing additional context so that it's easier to track down what went wrong.

Comment From: snicoll

Work in progress in https://github.com/snicoll/spring-framework/tree/gh-32777