Added try/catch
This commit is contained in:
parent
ba1b788936
commit
df2448b047
|
@ -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' />
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -20,7 +20,7 @@ public class ItemUrls implements Serializable {
|
|||
*
|
||||
*/
|
||||
public ItemUrls() {
|
||||
super();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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' />
|
||||
|
|
Loading…
Reference in New Issue