Failed Conditions
Pull Request — master (#1)
by Yo
05:58 queued 03:23
created

JsonRpcInternalErrorException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 14
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 2
1
<?php
2
namespace Yoanm\JsonRpcServer\Domain\Exception;
3
4
/**
5
 * Class JsonRpcInternalErrorException
6
 */
7
class JsonRpcInternalErrorException extends JsonRpcException
8
{
9
    const CODE = -32603;
10
    const DATA_PREVIOUS_KEY = 'previous';
11
12
    /**
13
     * @param \Exception|null $previousException
14
     */
15
    public function __construct(\Exception $previousException = null)
16
    {
17
        parent::__construct(
18
            self::CODE,
19
            'Internal error',
20
            $previousException ? [self::DATA_PREVIOUS_KEY => $previousException] : []
21
        );
22
    }
23
}
24