From 926bb2e1137759c8fe08068d2e9c15820dbc0464 Mon Sep 17 00:00:00 2001 From: Martin Oberhuber < martin.oberhuber@windriver.com> Date: Mon, 26 May 2008 23:01:14 +0000 Subject: [PATCH] [233993] Improve EFS error reporting --- .../rse/internal/efs/RSEFileStoreImpl.java | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileStoreImpl.java b/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileStoreImpl.java index fa442b18ebd..9c50610032b 100644 --- a/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileStoreImpl.java +++ b/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileStoreImpl.java @@ -306,9 +306,7 @@ public class RSEFileStoreImpl extends FileStore try { remoteFile = parent.getParentRemoteFileSubSystem().getRemoteFileObject(parent, getName(), monitor); } catch(SystemMessageException e) { - throw new CoreException(new Status(IStatus.ERROR, - Activator.getDefault().getBundle().getSymbolicName(), - getExceptionMessage(null, e), e)); + rethrowCoreException(e, EFS.ERROR_READ); } } else { //Handle was created with an absolute name @@ -317,10 +315,7 @@ public class RSEFileStoreImpl extends FileStore remoteFile = subSys.getRemoteFileObject(_store.getAbsolutePath(), monitor); } catch (SystemMessageException e) { - throw new CoreException(new Status( - IStatus.ERROR, - Activator.getDefault().getBundle().getSymbolicName(), - getExceptionMessage(null, e), e)); + rethrowCoreException(e, EFS.ERROR_READ); } } @@ -328,7 +323,8 @@ public class RSEFileStoreImpl extends FileStore if (forceExists && (remoteFile == null || !remoteFile.exists())) { throw new CoreException(new Status(IStatus.ERROR, Activator.getDefault().getBundle().getSymbolicName(), - Messages.FILE_STORE_DOES_NOT_EXIST)); + EFS.ERROR_NO_LOCATION, + Messages.FILE_STORE_DOES_NOT_EXIST, null)); } return remoteFile; } @@ -636,13 +632,13 @@ public class RSEFileStoreImpl extends FileStore */ public IFileStore mkdir(int options, IProgressMonitor monitor) throws CoreException { - //TODO Check should be done by IRemoteFileSubSystem.createFolders() - //if ((options & EFS.SHALLOW)!=0) { - // IFileStore parent = getParent(); - // if (parent == null) || !parent.{ - // parent.mkdir(options, monitor); - // } - //} + //TODO bug 234026: Check should be done by IRemoteFileSubSystem.createFolders() + if ((options & EFS.SHALLOW) == 0) { + IFileStore parent = getParent(); + if (parent != null) { + parent.mkdir(options, monitor); + } + } cacheRemoteFile(null); IRemoteFile remoteFile = getRemoteFileObject(monitor, false);