| Server IP : 34.87.99.72 / Your IP : 216.73.217.31 Web Server : Apache/2.4.46 (Unix) OpenSSL/1.1.1n System : Linux zlock-bitnami-lamp-prod-v2-vm 4.19.0-16-cloud-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 User : bitnami ( 1000) PHP Version : 7.4.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /opt/bitnami/apache/htdocs/app/vendor/ably/ably-php/src/Exceptions/ |
Upload File : |
<?php
namespace Ably\Exceptions;
use Ably\Models\ErrorInfo;
use \Exception;
/**
* Generic Ably exception
*/
class AblyException extends Exception {
/**
* @var ErrorInfo
*/
public $errorInfo;
/**
* @param string $message Exception's error message text
* @param integer|null $code 5-digit Ably error code
* also used as a PHP exception code
* @see https://github.com/ably/ably-common/blob/main/protocol/errors.json
* @param integer|null $statusCode HTTP error code
*/
public function __construct( $message, $code = null, $statusCode = null ) {
parent::__construct( $message, $code );
$this->errorInfo = new ErrorInfo();
$this->errorInfo->message = $message;
$this->errorInfo->code = $code;
$this->errorInfo->statusCode = $statusCode;
}
public function getStatusCode() {
return $this->errorInfo->statusCode;
}
// PHP doesn't allow overriding these methods
// public function getCode() {
// return $this->errorInfo->code;
// }
// public function getMessage() {
// return $this->errorInfo->message;
// }
}