[Semi split from T209285]
In includes/installer/WebInstallerUpgrade.php execute() (around line 65) if $installer->doUpgrade() returns false (e.g. It encountered a db query error), the execution just falls through and shows the dialog from the previous step.
Instead there should be an else statement for when $result is false, that calls $this->parent->getErrorBox() which advises the user of something along the lines of that an error occurred, the box above has more details and they can press continue to try again.
This message shown to the user should of course be i18n-ized and be added to includes/installer/i18n/en.json and includes/installer/i18n/qqq.json.
In order to test this behaviour, you will have to introduce an error into the install process. One easy way to do this is add something like $this->db->query( 'FADFSAd', __METHOD__ ); to includes/installer/MysqlUpdater.php, say at the beginning of checkBin() (line 392)