diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/server/ExpressionServiceImpl.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/server/ExpressionServiceImpl.java index 8145e50..c06a4e1 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/server/ExpressionServiceImpl.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/server/ExpressionServiceImpl.java @@ -29,6 +29,7 @@ import org.gcube.portlets.user.td.gwtservice.server.trservice.OperationsId; import org.gcube.portlets.user.td.gwtservice.server.trservice.TaskStateMap; import org.gcube.portlets.user.td.gwtservice.shared.Constants; import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTServiceException; +import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException; import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource; import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; import org.slf4j.Logger; @@ -100,7 +101,9 @@ public class ExpressionServiceImpl extends RemoteServiceServlet implements logger.debug("Start Task on service: TaskId " + trTask.getId()); ExpressionSession.setColumnFilterTask(session, trTask); return; - } catch (Exception e) { + } catch (TDGWTSessionExpiredException e){ + throw new ExpressionServiceException(e.getLocalizedMessage()); + } catch (Throwable e) { e.printStackTrace(); throw new ExpressionServiceException( "Error in Client Library Request: " @@ -194,7 +197,9 @@ public class ExpressionServiceImpl extends RemoteServiceServlet implements logger.info("ColumnFilterMonitor(): " + columnFilterMonitor); return columnFilterMonitor; - } catch (Exception e) { + } catch (TDGWTSessionExpiredException e){ + throw new ExpressionServiceException(e.getLocalizedMessage()); + } catch (Throwable e) { e.printStackTrace(); throw new ExpressionServiceException( "Error applying column filter: " + e.getLocalizedMessage()); diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/expression/ExpressionServiceException.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/expression/ExpressionServiceException.java index 776a2ae..4c8c86d 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/expression/ExpressionServiceException.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/expression/ExpressionServiceException.java @@ -1,5 +1,6 @@ package org.gcube.portlets.user.td.expressionwidget.shared.expression; + public class ExpressionServiceException extends Exception { private static final long serialVersionUID = -9066034060104406559L;