JsonRpcInternalErrorException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 7
ccs 6
cts 6
cp 1
crap 1
rs 10
1
<?php
2
namespace Yoanm\JsonRpcServer\Domain\Exception;
3
4
/**
5
 * JsonRpcInternalErrorException represents unhandled error during JsonRpc method processing
6
 * (e.g. "Internal server error").
7
 */
8
class JsonRpcInternalErrorException extends JsonRpcException
9
{
10
    const CODE = -32603;
11
12
    /**
13
     * @deprecated no longer in use, will be removed at next major release.
14
     */
15
    const DATA_PREVIOUS_KEY = 'previous';
16
17
    /**
18
     * @param \Throwable|null $previousException
19
     */
20 8
    public function __construct(\Throwable $previousException = null)
21
    {
22 8
        parent::__construct(
23 8
            self::CODE,
24 8
            'Internal error',
25 8
            [],
26 8
            $previousException
27 8
        );
28
    }
29
}
30