Skip to content

Commit

Permalink
Catch errors and log error, but continue running
Browse files Browse the repository at this point in the history
  • Loading branch information
DariusIII committed Feb 10, 2023
1 parent 544b851 commit 743151a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Blacklight/processing/post/ProcessAdditional.php
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,7 @@ protected function _processNZBContents(): int
{
$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'])) {
Expand Down Expand Up @@ -947,6 +948,9 @@ protected function _processNZBContents(): int
if (preg_match($this->_ignoreBookRegex, $this->_currentNZBFile['title'])) {
$totalBookFiles++;
}
} catch (\ErrorException $e) {
Log::debug($e->getTraceAsString());
}
}

return $totalBookFiles;
Expand Down

0 comments on commit 743151a

Please sign in to comment.