Commit ce074d45410a39ebc20a7f6bc20ea2599e53dca9
1 parent
ef41533d
temp commit - work with console Details validation
Showing
1 changed file
with
5 additions
and
5 deletions
Show diff stats
backend/controllers/ParserController.php
| ... | ... | @@ -327,13 +327,13 @@ class ParserController extends BaseController |
| 327 | 327 | if ( isset( $configuration['parser_config'] ) ) { |
| 328 | 328 | $parser_config = $configuration['parser_config']; |
| 329 | 329 | } |
| 330 | - try { | |
| 331 | - $data = \Yii::$app->multiparser->parse( $file_path, $parser_config ); | |
| 332 | - } catch (ErrorException $e) { | |
| 333 | - throw $e; | |
| 330 | + | |
| 331 | + $data = \Yii::$app->multiparser->parse( $file_path, $parser_config ); | |
| 332 | + if (! $data) { | |
| 333 | + // @todo переделать, что бы ошибка автоматически останавливала сценарий | |
| 334 | + die; | |
| 334 | 335 | } |
| 335 | 336 | |
| 336 | - // CustomVarDamp::dumpAndDie($data); | |
| 337 | 337 | $writer = new PriceWriter(); |
| 338 | 338 | $writer->configuration = $configuration; |
| 339 | 339 | $writer->data = $data; | ... | ... |