If there is an SQL error during container construction, you currently get PHP fatal errors. That is because certain globals which are fetched from the container do not exist yet. Such as: $phpbb_request and $phpbb_dispatcher.
This happens if a db table is missing (replacing 3.0 files with 3.1 files without running db update). We should catch these cases and allow the pretty error message to be displayed.