Kaynağa Gözat

Catch Throwable

Filip Procházka 9 yıl önce
ebeveyn
işleme
06efba7062

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

@@ -39,7 +39,7 @@ abstract class Handler implements HandlerInterface
     {
         try {
             $this->close();
-        } catch (\Exception $e) {
+        } catch (\Throwable $e) {
             // do nothing
         }
     }

+ 2 - 2
src/Monolog/Handler/WhatFailureGroupHandler.php

@@ -33,7 +33,7 @@ class WhatFailureGroupHandler extends GroupHandler
         foreach ($this->handlers as $handler) {
             try {
                 $handler->handle($record);
-            } catch (\Exception $e) {
+            } catch (\Throwable $e) {
                 // What failure?
             }
         }
@@ -49,7 +49,7 @@ class WhatFailureGroupHandler extends GroupHandler
         foreach ($this->handlers as $handler) {
             try {
                 $handler->handleBatch($records);
-            } catch (\Exception $e) {
+            } catch (\Throwable $e) {
                 // What failure?
             }
         }