Added case of abort in catch exception
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-uploader@128588 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
bc2b78e472
commit
440630e953
|
@ -116,6 +116,15 @@ public class WorkspaceUploaderMng {
|
||||||
} catch (Exception e1) {
|
} catch (Exception e1) {
|
||||||
logger.error("Error during WorkspaceUploaderItem session update: ",e1);
|
logger.error("Error during WorkspaceUploaderItem session update: ",e1);
|
||||||
}
|
}
|
||||||
|
}catch(UploadCanceledException e){
|
||||||
|
logger.info("UploadCanceledException thrown by client..");
|
||||||
|
workspaceUploader.setStatusDescription("Aborted upload: "+itemName);
|
||||||
|
workspaceUploader.setUploadStatus(UPLOAD_STATUS.ABORTED);
|
||||||
|
try {
|
||||||
|
WsUtil.putWorkspaceUploaderInSession(httpSession, workspaceUploader);
|
||||||
|
} catch (Exception e1) {
|
||||||
|
logger.error("Error during WorkspaceUploaderItem session update: ",e1);
|
||||||
|
}
|
||||||
}finally{
|
}finally{
|
||||||
try {
|
try {
|
||||||
// StreamUtils.deleteTempFile(uploadFile);
|
// StreamUtils.deleteTempFile(uploadFile);
|
||||||
|
@ -166,6 +175,15 @@ public class WorkspaceUploaderMng {
|
||||||
} catch (Exception e1) {
|
} catch (Exception e1) {
|
||||||
logger.error("Error during WorkspaceUploaderItem session update: ",e1);
|
logger.error("Error during WorkspaceUploaderItem session update: ",e1);
|
||||||
}
|
}
|
||||||
|
}catch(UploadCanceledException e){
|
||||||
|
logger.info("UploadCanceledException thrown by client..");
|
||||||
|
workspaceUploader.setStatusDescription("Aborted upload: "+itemName);
|
||||||
|
workspaceUploader.setUploadStatus(UPLOAD_STATUS.ABORTED);
|
||||||
|
try {
|
||||||
|
WsUtil.putWorkspaceUploaderInSession(httpSession, workspaceUploader);
|
||||||
|
} catch (Exception e1) {
|
||||||
|
logger.error("Error during WorkspaceUploaderItem session update: ",e1);
|
||||||
|
}
|
||||||
}finally{
|
}finally{
|
||||||
try {
|
try {
|
||||||
// StreamUtils.deleteTempFile(uploadFile);
|
// StreamUtils.deleteTempFile(uploadFile);
|
||||||
|
|
Loading…
Reference in New Issue