Test Failed
Push — feature/init ( ecfce8...b38e47 )
by Yo
05:12
created

JsonRpcInternalErrorException::__construct()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 1
nop 1
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
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