• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

letsdrink / ouzo / 7170637656

11 Dec 2023 04:47PM UTC coverage: 85.672% (-0.3%) from 85.99%
7170637656

push

github

web-flow
Refactored exception/error handlers. (#322)

14 of 30 new or added lines in 6 files covered. (46.67%)

2 existing lines in 1 file now uncovered.

4963 of 5793 relevant lines covered (85.67%)

67.63 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Ouzo/Core/ExceptionHandling/DebugErrorHandler.php
1
<?php
2
/*
3
 * Copyright (c) Ouzo contributors, https://github.com/letsdrink/ouzo
4
 * This file is made available under the MIT License (view the LICENSE file for more information).
5
 */
6

7
namespace Ouzo\ExceptionHandling;
8

9
use Whoops\Handler\PrettyPageHandler;
10
use Whoops\Run;
11

12
class DebugErrorHandler extends ErrorHandler
13
{
14
    public function handleError(int $errorNumber, string $errorString, string $errorFile, int $errorLine): void
15
    {
NEW
16
        $this->createWhoops()->handleError($errorNumber, $errorString, $errorFile, $errorLine);
×
17
    }
18

19
    public function handleShutdown(): void
20
    {
NEW
21
        $this->createWhoops()->handleShutdown();
×
22
    }
23

24
    private function createWhoops(): Run
25
    {
NEW
26
        error_reporting(E_ALL);
×
NEW
27
        $run = new Run();
×
NEW
28
        $run->pushHandler(new PrettyPageHandler());
×
NEW
29
        $run->pushHandler(new DebugErrorLogHandler());
×
NEW
30
        return $run;
×
31
    }
32
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc