| 1 |
<?php |
| 2 |
|
| 3 |
namespace Boxzilla\Licensing; |
| 4 |
|
| 5 |
use Exception; |
| 6 |
|
| 7 |
class API_Exception extends Exception |
| 8 |
{ |
| 9 |
|
| 10 |
/** |
| 11 |
* @var string |
| 12 |
*/ |
| 13 |
protected $apiCode; |
| 14 |
|
| 15 |
/** |
| 16 |
* API_Exception constructor. |
| 17 |
* |
| 18 |
* @param string $message |
| 19 |
* @param string $apiCode (optional) |
| 20 |
*/ |
| 21 |
public function __construct($message, $apiCode = '') |
| 22 |
{ |
| 23 |
parent::__construct($message); |
| 24 |
|
| 25 |
$this->apiCode = $apiCode; |
| 26 |
} |
| 27 |
|
| 28 |
/** |
| 29 |
* @return string |
| 30 |
*/ |
| 31 |
public function getApiCode() |
| 32 |
{ |
| 33 |
return $this->apiCode; |
| 34 |
} |
| 35 |
} |
| 36 |
|