mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-05 12:47:39 +02:00
Merge pull request #534 from rantonmattei/loggly-handler-curl
Added exception raised when a curl error occurs.
This commit is contained in:
@@ -87,7 +87,10 @@ class LogglyHandler extends AbstractProcessingHandler
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
|
||||
curl_exec($ch);
|
||||
if (curl_exec($ch) === false) {
|
||||
throw new \RuntimeException(sprintf('Curl error (code %s): %s', curl_errno($ch), curl_error($ch)));
|
||||
}
|
||||
|
||||
curl_close($ch);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user