Updated: Comment #0
Problem/Motivation
Currently, we attempt to treat E_RECOVERABLE_ERROR as a fatal. However, what we do with it is set the page title to "Error" (with a function we're trying to eliminate), create a Response object, return it... and then ignore it entirely. That means the program continues with no message other than the page title mysteriously being set to "Error". This is doubleplusungood.
The most common source of that error is a class name mismatch in a type hint, usually caused by a bad/missing "use" statement. That makes finding a common typo way harder than it should be.
Proposed resolution
Convert E_RECOVERABLE_ERROR to an ErrorException object and throw that. We already have an exception handling pipeline with ExceptionController, so it will get handled the same as any other exception and the message actually displayed. However, it also lets the calling code catch the exception and handle it more intelligently if it is so inclined. Currently it cannot do that.
Remaining tasks
We really ought to clean up the entirety of errors.inc, but that's for another time.
User interface changes
None.
API changes
None.