Bläddra i källkod

WhatFailureGroupHandler catches failures in method close (#1791)

Tetragramat 2 år sedan
förälder
incheckning
1f25f9b343
1 ändrade filer med 14 tillägg och 0 borttagningar
  1. 14 0
      src/Monolog/Handler/WhatFailureGroupHandler.php

+ 14 - 0
src/Monolog/Handler/WhatFailureGroupHandler.php

@@ -64,4 +64,18 @@ class WhatFailureGroupHandler extends GroupHandler
             }
         }
     }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function close(): void
+    {
+        foreach ($this->handlers as $handler) {
+            try {
+                $handler->close();
+            } catch (\Throwable $e) {
+                // What failure?
+            }
+        }
+    }
 }