Skip to content

Commit b77ce83

Browse files
hjuarez20enzolutions
authored andcommitted
[statistics] Catch error when the folder does not permission (#353)
* [statistics] Catch error when the folder does not permission * [statistics] Return if the error exist
1 parent c4d578d commit b77ce83

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/EventSubscriber/SaveStatisticsListener.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,14 @@ public function saveStatistics(ConsoleTerminateEvent $event)
102102
$information = $information . ',' . $countCodeLines;
103103
}
104104

105-
106-
$this->fs->appendToFile(
107-
$path . date('Y-m-d') . '.csv',
108-
$information . PHP_EOL
109-
);
105+
try{
106+
$this->fs->appendToFile(
107+
$path . date('Y-m-d') . '.csv',
108+
$information . PHP_EOL
109+
);
110+
}catch (\Exception $exception) {
111+
return;
112+
}
110113
}
111114

112115
/**

0 commit comments

Comments
 (0)