There is a slight behavioural change in boot 3.2.1 which I had to mitigate in spring-shell and there's a bit more info in https://github.com/spring-projects/spring-shell/issues/961.

In a nutshell some errors are not wrapped in IllegalStateException anymore and spring-shell relied on that. I do like this new behaviour better than the old one but wanted to create this issue as it was an unexpected change.

Also I think existing throw for IllegalStateException is a dead code as exception is always rethrown in handleRunFailure:

https://github.com/spring-projects/spring-boot/blob/7216d2b031be648763744a371b871fa7c320c722/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java#L347-L348

Comment From: wilkinsona

The move to using ThrowingConsumer.throwing means that only checked exceptions are wrapped in an IllegalStateException. Any unchecked exception is now rethrown as-is without the wrapping.

Comment From: philwebb

We discussed this today and we'd like to leave the new behavior as it is so that we're not wrapping exceptions that don't need to be. We'll open a new issue for the dead code enhancement.