Ejemplo n.º 1
0
 /**
  * Construct the exception. Note: The message is NOT need.
  *
  * @param PreInitResult|OperationResult|TransactionStatus $result   The Result of Gate Response
  * @param \Exception                                      $previous [optional] The previous exception used for the
  *                                                                  exception chaining
  */
 public function __construct($result, \Exception $previous = null)
 {
     $this->result = $result;
     $code = $result->ErrorCode;
     $message = Exception\Code::getMessage($code);
     parent::__construct($message, $code, $previous);
 }
Ejemplo n.º 2
0
 /**
  * Construct the exception.
  *
  * @param int        $code     The Exception code
  * @param \Exception $previous [optional] The previous exception used for the exception chaining
  */
 public function __construct($code, \Exception $previous = null)
 {
     $message = Exception\Code::getMessage($code);
     parent::__construct($message, $code, $previous);
 }