Skip to content

Commit

Permalink
Limit errors cases that will send mails
Browse files Browse the repository at this point in the history
  • Loading branch information
Slivo-fr committed May 9, 2019
1 parent e7cf9fb commit 2ddd9d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/CurlWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ static protected function handleErrors($output, $ch) {

if ($http_code >= 400) {
throw new Exception('HTTP error : ' . $http_code . ' on ' . curl_getinfo($ch, CURLINFO_EFFECTIVE_URL));

}
}
}
7 changes: 6 additions & 1 deletion src/Killbot.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,12 @@ private function processKill($data = null)
);
}

throw $exception;
if (Settings::$ENV === 'DEV') {
throw $exception;
} else {
Logger::log($exception->getMessage());
return false;
}
}
}

Expand Down

0 comments on commit 2ddd9d5

Please sign in to comment.