Updated Replace By Expression

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@100116 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-09-22 17:02:29 +00:00
parent 9b44bbbba3
commit 2655349bed
2 changed files with 26 additions and 4 deletions

View File

@ -1135,7 +1135,12 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
Table table = service.getLastTable(new TabularResourceId(Long
.valueOf(trId.getId())));
logger.debug("Table retrieved: " + table);
if(table==null){
logger.error("Last Table is Null: "+ Long
.valueOf(trId.getId()));
new TDGWTServiceException("Last Table is Null");
}
Table viewTable = null;
if (table.contains(DatasetViewTableMetadata.class)) {

View File

@ -113,7 +113,14 @@ public class OperationMonitorCreator {
SessionUtil.removeStartedTask(session, taskWrapper);
postOperation(operationMonitor);
} else {
TaskStatus status = taskWrapper.getTask().getStatus();
TaskStatus status=null;
try {
status=taskWrapper.getTask().getStatus();
} catch(Throwable e){
logger.debug("Error retrieving task status: "+taskWrapper.getTask()+" "+e.getLocalizedMessage());
e.printStackTrace();
}
if (status == null) {
logger.debug("Services TaskStatus : null");
throw new TDGWTServiceException(
@ -278,8 +285,18 @@ public class OperationMonitorCreator {
new Long(trId.getId()));
TabularResource tr = service.getTabularResource(tabularResourceId);
if(tr==null){
logger.error("Tabular Resource Null [id="+trId.getId()+"]");
throw new TDGWTServiceException("Tabular Resource Null "+trId);
}
Table table = service.getLastTable(tabularResourceId);
if(table==null){
logger.error("Last Table Null");
throw new TDGWTServiceException("Last Table Null for "+tr);
}
Table viewTable = null;
if (table.contains(DatasetViewTableMetadata.class)) {
@ -319,7 +336,7 @@ public class OperationMonitorCreator {
"Security exception, you haven't rights!");
} catch (Throwable e) {
e.printStackTrace();
throw new TDGWTServiceException("Error in Client Library Request: "
throw new TDGWTServiceException("Error Retrieving Basic Data: "
+ e.getLocalizedMessage());
}
}