#1504, fixed error message.
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@76918 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
2aaff0b61b
commit
f0603d0c58
|
@ -296,15 +296,13 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
|||
|
||||
workspace = getWorkspace();
|
||||
|
||||
List<FileGridModel> listFileGridModels = new ArrayList<FileGridModel>();
|
||||
|
||||
GCUBEClientLog logger = new GCUBEClientLog(GWTWorkspaceServiceImpl.class);
|
||||
logger.trace("get child for Grid by id: "+itemId);
|
||||
|
||||
workspaceLogger.trace("get children for Grid");
|
||||
|
||||
WorkspaceItem wsItem = workspace.getItem(itemId);
|
||||
|
||||
|
||||
GWTWorkspaceBuilder builder = getGWTWorkspaceBuilder();
|
||||
|
||||
Long startTime = System.currentTimeMillis();
|
||||
|
@ -313,14 +311,20 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
|||
String time = String.format("%d msc %d sec", endTime, TimeUnit.MILLISECONDS.toSeconds(endTime));
|
||||
logger.trace("get child for Grid by id returning element in " + time);
|
||||
|
||||
return builder.buildGXTFileGridModelItem(wsItem, null);
|
||||
|
||||
//BUILD PARENT
|
||||
WorkspaceFolder folder = wsItem.getParent(); //get parent
|
||||
FileGridModel wsFolder = builder.buildGXTFileGridModelItem(folder, null);
|
||||
|
||||
//BUILD ITEM
|
||||
return builder.buildGXTFileGridModelItem(wsItem, wsFolder);
|
||||
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
workspaceLogger.error("Error in server during item retrieving", e);
|
||||
// workspaceLogger.trace("Error in server During items retrieving " + e);
|
||||
// e.printStackTrace();
|
||||
//GWT can't serialize all exceptions
|
||||
throw new Exception("Error during item loading, please contact the support.");
|
||||
workspaceLogger.error("Error in server during item retrieving, getItemForFileGrid", e);
|
||||
String error = ConstantsExplorer.SERVER_ERROR + " retrieving item. Item not exists or you haven't permission to access this item";
|
||||
throw new Exception(error);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue