Are you sure this line is correct?
Should not it be "yii\base\ErrorException" now extends '\ErrorException'?