Catch errors and log error, but continue running

This commit is contained in:
DariusIII
2023-02-10 20:43:45 +01:00
parent 544b851e38
commit 743151aabc
@@ -885,6 +885,7 @@ class ProcessAdditional
{
$totalBookFiles = 0;
foreach ($this->_nzbContents as $this->_currentNZBFile) {
try{
// Check if it's not a nfo, nzb, par2 etc...
if (preg_match($this->_supportFileRegex.'|nfo\b|inf\b|ofn\b)($|[ ")\]-])(?!.{20,})/i', $this->_currentNZBFile['title'])) {
@@ -947,6 +948,9 @@ class ProcessAdditional
if (preg_match($this->_ignoreBookRegex, $this->_currentNZBFile['title'])) {
$totalBookFiles++;
}
} catch (\ErrorException $e) {
Log::debug($e->getTraceAsString());
}
}
return $totalBookFiles;