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