Passed
Pull Request — master (#133)
by
unknown
02:21
created

TestPdoConnector::databaseError()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 4
c 2
b 0
f 0
dl 0
loc 6
rs 10
cc 2
nc 2
nop 4
1
<?php
2
3
4
namespace SilverStripe\StaticPublishQueue\Dev;
5
6
use SilverStripe\ORM\Connect\DatabaseException;
7
use SilverStripe\ORM\Connect\PDOConnector;
8
9
class TestPdoConnector extends PDOConnector
10
{
11
    protected function databaseError($msg, $errorLevel = E_USER_ERROR, $sql = null, $parameters = [])
12
    {
13
        try {
14
            parent::databaseError($msg, $errorLevel, $sql, $parameters);
15
        } catch (DatabaseException $e) {
16
            echo $e->getTraceAsString();
17
        }
18
    }
19
}
20