[BUGFIX] Exception class not found in ApplicationContext

If a wrong application context is set, an exception
should be thrown, however the exception class is
not found.

Resolves: #53162
Releases: 6.2
Change-Id: Ia863d162a2a983a46341a6f2b124702080a94542
Reviewed-on: https://review.typo3.org/25051
Reviewed-by: Wouter Wolters
Reviewed-by: Stefan Neufeind
Reviewed-by: Steffen Müller
Tested-by: Steffen Müller