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

IlyasDeckers / ody-core / 13532154862

25 Feb 2025 10:24PM UTC coverage: 30.374% (+1.7%) from 28.706%
13532154862

push

github

web-flow
Update php.yml

544 of 1791 relevant lines covered (30.37%)

9.13 hits per line

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

0.0
/src/Error/AbstractErrorRenderer.php
1
<?php
2
declare(strict_types=1);
3

4
namespace Ody\Core\Error;
5

6
use Ody\Core\Exception\HttpException;
7
use Ody\Core\Interfaces\ErrorRendererInterface;
8
use Throwable;
9

10
/**
11
 * Abstract application error renderer
12
 *
13
 * It outputs the error message and diagnostic information in one of the following formats:
14
 * JSON, XML, Plain Text or HTML
15
 */
16
abstract class AbstractErrorRenderer implements ErrorRendererInterface
17
{
18
    protected string $defaultErrorTitle = 'Application Error';
19

20
    protected string $defaultErrorDescription = 'A website error has occurred. Sorry for the temporary inconvenience.';
21

22
    protected function getErrorTitle(Throwable $exception): string
×
23
    {
24
        if ($exception instanceof HttpException) {
×
25
            return $exception->getTitle();
×
26
        }
27

28
        return $this->defaultErrorTitle;
×
29
    }
30

31
    protected function getErrorDescription(Throwable $exception): string
×
32
    {
33
        if ($exception instanceof HttpException) {
×
34
            return $exception->getDescription();
×
35
        }
36

37
        return $this->defaultErrorDescription;
×
38
    }
39
}
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

© 2026 Coveralls, Inc