Skip to content

Commit

Permalink
added error messages for #163 and #169 [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
006627 committed Sep 11, 2019
1 parent 4c98d49 commit 86b8aa9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.util.Map;
import java.util.Set;

import com.databasepreservation.main.common.shared.exceptions.ViewerException;
import org.apache.commons.io.IOUtils;
import org.roda.core.data.exceptions.GenericException;
import org.roda.core.data.exceptions.NotFoundException;
Expand Down Expand Up @@ -404,6 +405,8 @@ private static void convertSIARDMetadataToSolr(Path siardPath, String databaseUU

} catch (IOException e) {
throw new GenericException("Could not initialize conversion modules", e);
} catch (ViewerException e){
throw new GenericException(e.getMessage(), e);
} catch (ModuleException | RuntimeException e) {
throw new GenericException("Could not convert the database to the Solr instance.", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ public void onSuccess(IsIndexed result) {
content.remove(spinner);
sideBarHighlighter(TableAndColumnsSendToSidebar.DATABASE_LINK,null,null);
}

@Override
public void onFailure(Throwable caught) {
Toast.showError(messages.errorMessagesTableAndColumnsTitle(), caught.getMessage());
content.remove(spinner);
}
});
}

Expand All @@ -160,6 +166,12 @@ public void onSuccess(ViewerMetadata result) {
content.remove(spinner);
sideBarHighlighter(TableAndColumnsSidebar.DATABASE_LINK,null,null);
}

@Override
public void onFailure(Throwable caught) {
Toast.showError(messages.errorMessagesTableAndColumnsTitle(), caught.getMessage());
content.remove(spinner);
}
});
}

Expand Down

0 comments on commit 86b8aa9

Please sign in to comment.