![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/job-board.corals.io/vendor/xendit/xendit-php/src/Exceptions/ |
<?php /** * ApiException.php * php version 7.2.0 * * @category Exception * @package Xendit\Exceptions * @author Ellen <[email protected]> * @license https://opensource.org/licenses/MIT MIT License * @link https://api.xendit.co */ namespace Xendit\Exceptions; /** * Class ApiException * * @category Exception * @package Xendit\Exceptions * @author Ellen <[email protected]> * @license https://opensource.org/licenses/MIT MIT License * @link https://api.xendit.co */ class ApiException extends \Exception implements ExceptionInterface { protected $errorCode; /** * Get error code for the exception instance * * @return string */ public function getErrorCode() { return $this->errorCode; } /** * Create new instance of ApiException * * @param string $message corresponds to message field in Xendit's HTTP error * @param string $code corresponds to http status in Xendit's HTTP response * @param string $errorCode corresponds to error_code field in Xendit's HTTP * error */ public function __construct($message, $code, $errorCode) { if (!$message) { throw new $this('Unknown '. get_class($this)); } parent::__construct($message, $code); $this->errorCode = $errorCode; } }