@@ -7,11 +7,17 @@ |
||
| 7 | 7 | protected $defaultMessage = 'Unknown SugarAPI SDK Exception Occurred.'; |
| 8 | 8 | protected $failureCodes = array(); |
| 9 | 9 | |
| 10 | + /** |
|
| 11 | + * @param string $code |
|
| 12 | + */ |
|
| 10 | 13 | public function __construct($code) { |
| 11 | 14 | $message = $this->convertCode($code); |
| 12 | 15 | parent::__construct($message); |
| 13 | 16 | } |
| 14 | 17 | |
| 18 | + /** |
|
| 19 | + * @return string|null |
|
| 20 | + */ |
|
| 15 | 21 | protected function convertCode($code,$string=''){ |
| 16 | 22 | if (array_key_exists($code,$this->failureCodes)){ |
| 17 | 23 | return $this->failureCodes[$code]; |