From b8d975aeacabed2b9c74bc17753ba8e1a10926c5 Mon Sep 17 00:00:00 2001 From: David McKnight Date: Wed, 11 Jul 2007 17:15:15 +0000 Subject: [PATCH] [196035] wrappering systemmessageexception with remotefilesecurityexception --- .../services/dstore/files/DStoreFileService.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java index fb986282cea..2d6da492b6e 100644 --- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java +++ b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java @@ -16,6 +16,7 @@ * Xuan Chen (IBM) - [189681] [dstore][linux] Refresh Folder in My Home messes up Refresh in Root * Kushal Munir (IBM) - [189352] Replace with appropriate line end character on upload * David McKnight (IBM) - [190803] Canceling a long-running dstore job prints "InterruptedException" to stdout + * David McKnight (IBM) - [196035] Wrapper SystemMessageExceptions for createFile and createFolder with RemoteFileSecurityException ********************************************************************************/ package org.eclipse.rse.internal.services.dstore.files; @@ -60,6 +61,7 @@ import org.eclipse.rse.services.dstore.util.DownloadListener; import org.eclipse.rse.services.dstore.util.FileSystemMessageUtil; import org.eclipse.rse.services.files.IFileService; import org.eclipse.rse.services.files.IHostFile; +import org.eclipse.rse.services.files.RemoteFileSecurityException; public class DStoreFileService extends AbstractDStoreService implements IFileService { @@ -887,7 +889,11 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer } else { - throw new SystemMessageException(getMessage("RSEF1302").makeSubstitution(remotePath)); //$NON-NLS-1$ + // for 196035 - throwing security exception instead of message exception + Exception e= new SystemMessageException(getMessage("RSEF1302").makeSubstitution(remotePath)); //$NON-NLS-1$ + RemoteFileSecurityException messageException = new RemoteFileSecurityException(e); + throw messageException; + //throw new SystemMessageException(getMessage("RSEF1302").makeSubstitution(remotePath)); //$NON-NLS-1$ } } @@ -907,7 +913,11 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer } else { - throw new SystemMessageException(getMessage("RSEF1304").makeSubstitution(remotePath)); //$NON-NLS-1$ + // for 196035 - throwing security exception instead of message exception + Exception e= new SystemMessageException(getMessage("RSEF1304").makeSubstitution(remotePath)); //$NON-NLS-1$ + RemoteFileSecurityException messageException = new RemoteFileSecurityException(e); + throw messageException; + //throw new SystemMessageException(getMessage("RSEF1304").makeSubstitution(remotePath)); //$NON-NLS-1$ } }