forked from hmadra/cloudstack-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClientException.php
More file actions
39 lines (32 loc) · 758 Bytes
/
ClientException.php
File metadata and controls
39 lines (32 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
declare(strict_types=1);
namespace PCextreme\Cloudstack\Exception;
use Exception;
class ClientException extends Exception
{
/**
* @var mixed
*/
protected $response;
/**
* @param string $message
* @param integer $code
* @param array|string $response
* @return void
*/
public function __construct(string $message, int $code, $response)
{
$this->response = $response;
parent::__construct($message, $code);
}
/**
* Returns the exception's response body.
* @TODO: Refactor this method, so that it returns a single type.
*
* @return array|string
*/
public function getResponseBody()
{
return $this->response;
}
}