Classes

Catch exceptions thrown in a PSR-15 middleware stack and handle them safely.
Inspired by Illuminate\View\Middleware\ShareErrorsFromSession.