Przeglądaj źródła

Merge pull request #824 from adambro/patch-1

Throw RuntimeException if socket resource is missing
Jordi Boggiano 9 lat temu
rodzic
commit
b5794652f5
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/Monolog/Handler/SyslogUdp/UdpSocket.php

+ 1 - 1
src/Monolog/Handler/SyslogUdp/UdpSocket.php

@@ -44,7 +44,7 @@ class UdpSocket
     protected function send($chunk)
     {
         if (!is_resource($this->socket)) {
-            throw new \LogicException('The UdpSocket to '.$this->ip.':'.$this->port.' has been closed and can not be written to anymore');
+            throw new \RuntimeException('The UdpSocket to '.$this->ip.':'.$this->port.' has been closed and can not be written to anymore');
         }
         socket_sendto($this->socket, $chunk, strlen($chunk), $flags = 0, $this->ip, $this->port);
     }