Skip to content

Commit

Permalink
[statistics] Catch error when the folder does not permission (#353)
Browse files Browse the repository at this point in the history
* [statistics] Catch error when the folder does not permission

* [statistics] Return if the error exist
  • Loading branch information
hjuarez20 authored and enzolutions committed May 29, 2019
1 parent c4d578d commit b77ce83
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/EventSubscriber/SaveStatisticsListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,14 @@ public function saveStatistics(ConsoleTerminateEvent $event)
$information = $information . ',' . $countCodeLines;
}


$this->fs->appendToFile(
$path . date('Y-m-d') . '.csv',
$information . PHP_EOL
);
try{
$this->fs->appendToFile(
$path . date('Y-m-d') . '.csv',
$information . PHP_EOL
);
}catch (\Exception $exception) {
return;
}
}

/**
Expand Down

0 comments on commit b77ce83

Please sign in to comment.