Skip to content

Commit

Permalink
#1: handle exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Fredrik Gumban committed Jan 30, 2020
1 parent c04e7f0 commit ba4ecec
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion MarkLogicAddIn/DocumentPanelViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public async void FetchDocument(ConnectionProfile connProfile, string documentUr
DocumentUri = documentUri;
FormattedContent = document.RawContent;
}
catch (AuthorizationRequiredException e)
catch (Exception e)
{
ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show(e.ToString(), "MarkLogic", MessageBoxButton.OK, MessageBoxImage.Error);
}
Expand Down
17 changes: 13 additions & 4 deletions MarkLogicAddIn/SearchDockPaneViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,19 @@ private async Task<long> DoValues(SearchQuery query, string searchOptions, strin
private async void GetQueryOptions()
{
if (_queryOptions == null && HasSelectedSearchServiceProfile)
_queryOptions = await SearchService.Instance.ConfigQuery(_conn, SelectedSearchServiceProfile.SearchOptions);

NotifyPropertyChanged(() => HasQueryOptions);
NotifyPropertyChanged(() => QueryOptions);
{
try
{
_queryOptions = await SearchService.Instance.ConfigQuery(_conn, SelectedSearchServiceProfile.SearchOptions);
NotifyPropertyChanged(() => HasQueryOptions);
NotifyPropertyChanged(() => QueryOptions);
}
catch (Exception e)
{
ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show(e.ToString(), "MarkLogic", MessageBoxButton.OK, MessageBoxImage.Error);
}
}

}

private void AppendConstraint(object constraintName)
Expand Down

0 comments on commit ba4ecec

Please sign in to comment.