public void LogException(DropboxException exception) { if ((exception is DropboxRestException) && ((DropboxRestException) exception).StatusCode == HttpStatusCode.Unauthorized) return; Logger.LogExceptionSilently(exception); }
private void reportError(DropboxException ex) { _dispatcher.BeginInvoke(() => { var han = Error; if (han != null) han(ex.Message); }); }
public void LogException(DropboxException exception) { switch (exception.StatusCode) { case HttpStatusCode.Unauthorized: break; default: myLogger.LogExceptionSilently(exception); break; } }
private void OnFileDownloadFailed(DropboxException obj) { Dispatcher.BeginInvoke(() => { progBusy.IsBusy = false; MessageBox.Show( DropBoxResources.DownloadError, DropBoxResources.ListTitle, MessageBoxButton.OK); }); }
private void LoginFailed(DropboxException ex) { Dispatcher.BeginInvoke(() => { progBusy.IsBusy = false; MessageBox.Show(DropBoxResources.LoginFailure, DropBoxResources.LoginTitle, MessageBoxButton.OK); txtEmail.Focus(); txtEmail.SelectAll(); }); }
void OnFail(DropboxException ed) { Utilities.ShowProgressIndicator(false); Uploading = false; switch (ed.StatusCode) { case HttpStatusCode.NotFound: case HttpStatusCode.LengthRequired: MessageBox.Show(Labels.ConnectionErrorMessage, Labels.ConnectionErrorTitle, MessageBoxButton.OK); return; case HttpStatusCode.BadRequest: MessageBox.Show(Labels.FileExtensionError, Labels.ErrorTitle, MessageBoxButton.OK); return; } MessageBox.Show(Labels.GenericErrorMessage, Labels.ErrorTitle, MessageBoxButton.OK); }
void Fail(DropboxException ed) { Utilities.ShowProgressIndicator(false); switch ((int)ed.StatusCode) { case (int)HttpStatusCode.NotFound: MessageBox.Show(Labels.ConnectionErrorMessage, Labels.ConnectionErrorTitle, MessageBoxButton.OK); return; case (int)HttpStatusCode.Forbidden: MessageBox.Show(Labels.FolderExist, Labels.ErrorTitle, MessageBoxButton.OK); return; case 507: MessageBox.Show(Labels.NoSpaceAvailable, Labels.ErrorTitle, MessageBoxButton.OK); return; } MessageBox.Show(ed.StatusCode.ToString()); }
private void OnListFailed(DropboxException ex) { Dispatcher.BeginInvoke(() => MessageBox.Show( DropBoxResources.ListError, DropBoxResources.ListTitle, MessageBoxButton.OK)); }
void OnShareFailed(DropboxException ex) { Utilities.ShowProgressIndicator(false); switch (ex.StatusCode) { case HttpStatusCode.Forbidden: MessageBox.Show(Labels.ShareFileError, Labels.ErrorTitle, MessageBoxButton.OK); break; case HttpStatusCode.NotFound: MessageBox.Show(Labels.FileNotFoundShare, Labels.ErrorTitle, MessageBoxButton.OK); break; case HttpStatusCode.NotAcceptable: MessageBox.Show(Labels.ServerError, Labels.ErrorTitle, MessageBoxButton.OK); break; default: MessageBox.Show(ex.StatusCode.ToString()); break; } }
private void OnLoginError(DropboxException error) { this.DialogViewService.MessageBoxOkInUIThead(NewDownload.Error, NewDownload.DropboxLoginFailed); this.Logout(); }
public void GetFolderContent(string folder, Action<IEnumerable<DropBoxItem>> onSuccess, Action<Exception> onError) { if (!IsAuthenticated) { var exception = new DropboxException("Not authenticated"); onError(exception); return; } Client.GetMetaDataAsync(folder, metaData => { var contents = metaData .Contents .Select(DropBoxItem.FromMetaData) .ToList(); onSuccess(contents); }, dropBoxException => onError(dropBoxException)); }
void OnDownloadFailed(DropboxException ex) { Utilities.ShowProgressIndicator(false); switch (ex.StatusCode) { case HttpStatusCode.NotFound: MessageBox.Show(Labels.FileNotFoundShare, Labels.ErrorTitle, MessageBoxButton.OK); break; default: MessageBox.Show(ex.StatusCode.ToString()); break; } }
protected void Fail(DropboxException ed) { IsLoading = false; Deployment.Current.Dispatcher.BeginInvoke(() => Utilities.ShowProgressIndicator(false)); MessageBox.Show(Labels.GenericErrorMessage, Labels.ErrorTitle, MessageBoxButton.OK); }
private void Can_Upload_Large_File_Async_Failure(DropboxException error) { Assert.IsTrue(false); }
/// <summary> /// Folder meta data could not found. /// </summary> void OnFirstSyncMetaDataError(DropboxException err) { // // Remote site has no such an folder. // This is expected response from server. // // Let's create dropbox folder and // start to sync between REMOTE and LOCAL. // if (err.StatusCode == HttpStatusCode.NotFound) { Log("No folder on remote side. Let's create new folder:{0}", _ws.Name); ThreadUtil.Execute(CreateDropboxFolder); return; } FireFinishedEvent(DropboxSyncResult.UnknownError, err.Response.ErrorMessage); }
private void Can_Get_Thumbnail_Async_Failure(DropboxException error) { Assert.IsTrue(false); }
/// <summary> /// Error message /// </summary> /// <param name="err">Dropbox exception</param> /// <returns>Error message from exception object</returns> string ErrorMessage(DropboxException err) { if (err == null || err.Response == null) return "Unknown error"; return err.Response.Content; }
private void OnFail(DropboxException ex) { MessageBox.Show(Labels.UserInfoError, Labels.ErrorTitle, MessageBoxButton.OK); }
private void Fail(DropboxException ex) { Found = false; IsLoading = false; if (ex.StatusCode == HttpStatusCode.NotFound) { MessageBox.Show(Labels.ConnectionErrorMessage, Labels.ConnectionErrorTitle, MessageBoxButton.OK); } MessageBox.Show(Labels.GenericErrorMessage, Labels.ErrorTitle, MessageBoxButton.OK); }
private void OnMetaDaError(DropboxException error) { this.DialogViewService.MessageBoxOkInUIThead(NewDownload.Error, NewDownload.BrowseFolderFailedLabel); this.Logout(); }
private void OnChunkedUploadFailure(DropboxException dropboxException) { _chunksFailed++; if (_lastChunkUploaded != null && _chunksFailed <= _maxRetries.GetValueOrDefault(DefaultMaxRetries)) { OnChunkSuccess(_lastChunkUploaded); } else { _failure.Invoke(dropboxException); } }