Example #1
0
        protected void provideError(VKError error)
        {
            if (mCanceled)
                return;
            if (Error != null)
                Error(this, error);

            cancel();
        }
Example #2
0
        public void OnError(VKError error)
        {
            error.request = this;
            if (Error != null)
            {
                Error(this, error);
            }

            if (PostRequestsQueue == null || PostRequestsQueue.Count <= 0) return;
            foreach (var postRequest in PostRequestsQueue.Where(postRequest => postRequest.Error != null))
            {
                postRequest.Error(this, error);
            }
        }
Example #3
0
        private bool processCommonError(VKError error)
        {
            if (error.errorCode == VKError.VK_API_ERROR)
            {
                if (error.apiError.errorCode == 14)
                {
                    error.apiError.request = this;
                    VKSdk.instance().sdkListener().onCaptchaError(error.apiError);
                    return true;
                }
                if (error.apiError.errorCode == 16)
                {
                    VKAccessToken token = VKSdk.getAccessToken();
                    token.httpsRequired = true;
                    return true;
                }
                if (error.apiError.errorCode == 17)
                {
                    return true;
                }
            }

            return false;
        }
Example #4
0
        public WebRequest GetPreparedRequest()
        {
            var request = _requestFactory.RequestWithVkRequest(this);

            if (request != null)
                return request;

            var error = new VKError(VKError.VK_API_REQUEST_NOT_PREPARED);
            Error(this, error);
            return null;
        }