models/ImportForm.php
protected function throwInvalidModelException($model)
    {
        $errorMessage = Yii::t('language', 'Invalid model "{model}":', ['model' => $model->className()]);
        foreach ($model->getErrors() as $attribute => $errors) {
            $errorMessage .= "\n $attribute: " . join(', ', $errors);
        }
        throw new Exception($errorMessage);
    }
protected function throwInvalidModelException($model)
    {
        $errorMessage = Yii::t('language', 'Invalid model "{model}":', ['model' => $model->className()]);
        foreach ($model->getErrors() as $attribute => $errors) {
            $errorMessage .= "\n $attribute: " . join(', ', $errors);
        }
        throw new Exception($errorMessage);
    }
protected function throwInvalidModelException ( $ model ) { $ errorMessage = Yii :: t ( 'language' , 'Invalid model "{model}":' , [ 'model' => $ model -> className ( ) ] ) ; foreach ( $ model -> getErrors ( ) as $ attribute => $ errors ) { $ errorMessage .= "\n $attribute: " . join ( ', ' , $ errors ) ; } throw new Exception ( $ errorMessage ) ; }
Converts the model validation errors to a readable format an throws it as an exception

@param ActiveRecord $model

@throws Exception
Converts the model validation errors to a readable format an throws it as an exception