Added try/catch

This commit is contained in:
Francesco Mangiacrapa 2019-12-05 11:51:11 +01:00
parent ba1b788936
commit df2448b047
4 changed files with 9 additions and 8 deletions

View File

@ -12,9 +12,9 @@
<!-- Other module inherits -->
<!-- Specify the app entry point class. -->
<entry-point
class='org.gcube.portlets_widgets.catalogue_sharing_widget.client.ShareCatalogue' />
<!-- Specify the app entry point class.
<entry-point class='org.gcube.portlets_widgets.catalogue_sharing_widget.client.ShareCatalogue' />
-->
<!-- Specify the paths for translatable code -->
<source path='client' />

View File

@ -33,9 +33,10 @@ public class ShareServicesImpl extends RemoteServiceServlet implements ShareServ
@Override
public ItemUrls getPackageUrl(String uuid) throws Exception{
logger.debug("Called getPackageUrl for uuid: " + uuid);
try {
String scopePerCurrentUrl = ServerUtils.getScopeFromClientUrl(getThreadLocalRequest());
logger.debug("The scope per current URL is: " + scopePerCurrentUrl);
DataCatalogue catalogue = getCatalogue(scopePerCurrentUrl);
CkanDataset dataset = catalogue.getDataset(uuid, catalogue.getApiKeyFromUsername(ServerUtils.getUserInSession(getThreadLocalRequest())));
String longUrl = catalogue.getUnencryptedUrlFromDatasetIdOrName(uuid);

View File

@ -20,7 +20,7 @@ public class ItemUrls implements Serializable {
*
*/
public ItemUrls() {
super();
}
/**

View File

@ -12,9 +12,9 @@
<!-- Other module inherits -->
<!-- Specify the app entry point class. -->
<entry-point
class='org.gcube.portlets_widgets.catalogue_sharing_widget.client.ShareCatalogue' />
<!-- Specify the app entry point class.
<entry-point class='org.gcube.portlets_widgets.catalogue_sharing_widget.client.ShareCatalogue' />
-->
<!-- Specify the paths for translatable code -->
<source path='client' />