Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
VultrServiceException | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace Vultr\VultrPhp\Services; |
6 | |
7 | use Throwable; |
8 | use Vultr\VultrPhp\VultrException; |
9 | |
10 | class VultrServiceException extends VultrException |
11 | { |
12 | public const ACCOUNT_CODE = 301; |
13 | public const APPLICATION_CODE = 302; |
14 | public const BACKUP_CODE = 303; |
15 | public const BLOCK_CODE = 304; |
16 | public const BILL_CODE = 321; |
17 | public const BM_CODE = 322; // Bare Metal |
18 | public const DNS_CODE = 305; |
19 | public const FIREWALL_CODE = 306; |
20 | public const INSTANCE_CODE = 307; |
21 | public const ISO_CODE = 308; |
22 | public const KUBERNETES_CODE = 309; |
23 | public const LB_CODE = 310; // Load balancers |
24 | public const OBJ_CODE = 311; // Object Storage |
25 | public const OS_CODE = 312; // Operating System |
26 | public const PLAN_CODE = 313; |
27 | public const RESERVED_IP_CODE = 315; |
28 | public const REGION_CODE = 316; |
29 | public const SNAPSHOT_CODE = 317; |
30 | public const SSH_CODE = 318; |
31 | public const STARTUP_CODE = 319; |
32 | public const USER_CODE = 320; |
33 | public const VPC_CODE = 314; // Private Networks |
34 | |
35 | public function __construct(string $message, int $code = VultrException::SERVICE_CODE, ?int $http_code = null, ?Throwable $previous = null) |
36 | { |
37 | parent::__construct($message, $code, $http_code, $previous); |
38 | } |
39 | } |