Improve `SpringApplication` by removing the unreachable throw statement in favor of returning an exception from `handleRunFailure`. This commit also removes the if statements in favor of dedicated catch blocks. See gh-39107
static