Disque\Connection\Response\ErrorResponse::getExceptionClass PHP Method

getExceptionClass() private method

Creates ResponseException based off error
private getExceptionClass ( string $error ) : string
$error string Error
return string Class Name
    private function getExceptionClass($error)
    {
        $errors = ['PAUSED' => QueuePausedResponseException::class];
        $exceptionClass = ResponseException::class;
        list($errorCode) = explode(" ", $error);
        if (!empty($errorCode) && isset($errors[$errorCode])) {
            $exceptionClass = $errors[$errorCode];
        }
        return $exceptionClass;
    }