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

brick / geo / 13721917585

07 Mar 2025 01:37PM UTC coverage: 49.758%. Remained the same
13721917585

push

github

BenMorel
Unconditionally catch exceptions in PDOEngine & SQLite3Engine

+ include underlying engine message in exception message.

23 of 28 new or added lines in 4 files covered. (82.14%)

4 existing lines in 3 files now uncovered.

1746 of 3509 relevant lines covered (49.76%)

974.92 hits per line

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

44.44
/src/Exception/GeometryEngineException.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Brick\Geo\Exception;
6

7
/**
8
 * Exception thrown by geometry engines.
9
 *
10
 * This exception is notably thrown when a specific method is not implemented by a geometry engine.
11
 */
12
final class GeometryEngineException extends GeometryException
13
{
14
    public static function wrap(\Exception $e) : GeometryEngineException
15
    {
16
        return new self('The engine returned an exception: ' . $e->getMessage(), 0, $e);
459✔
17
    }
18

19
    public static function unimplementedMethod(string $methodName) : GeometryEngineException
20
    {
UNCOV
21
        $message = sprintf('%s() is currently not implemented.', $methodName);
64✔
22

UNCOV
23
        return new self($message);
64✔
24
    }
25

26
    public static function operationYieldedNoResult() : GeometryEngineException
27
    {
28
        return new self('This operation yielded no result on the target database.');
137✔
29
    }
30

31
    public static function unexpectedReturnType(
32
        string $expectedClassName,
33
        string $actualClassName,
34
    ) : GeometryEngineException {
35
        return new self(sprintf(
×
36
            'The geometry engine returned an unexpected type: expected %s, got %s.',
×
37
            $expectedClassName,
×
38
            $actualClassName,
×
39
        ));
×
40
    }
41
}
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