1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-13 20:15:22 +02:00

[233993] Improve EFS error reporting

This commit is contained in:
Martin Oberhuber 2008-05-26 23:01:14 +00:00
parent 6cf82ac668
commit 926bb2e113

View file

@ -306,9 +306,7 @@ public class RSEFileStoreImpl extends FileStore
try { try {
remoteFile = parent.getParentRemoteFileSubSystem().getRemoteFileObject(parent, getName(), monitor); remoteFile = parent.getParentRemoteFileSubSystem().getRemoteFileObject(parent, getName(), monitor);
} catch(SystemMessageException e) { } catch(SystemMessageException e) {
throw new CoreException(new Status(IStatus.ERROR, rethrowCoreException(e, EFS.ERROR_READ);
Activator.getDefault().getBundle().getSymbolicName(),
getExceptionMessage(null, e), e));
} }
} else { } else {
//Handle was created with an absolute name //Handle was created with an absolute name
@ -317,10 +315,7 @@ public class RSEFileStoreImpl extends FileStore
remoteFile = subSys.getRemoteFileObject(_store.getAbsolutePath(), monitor); remoteFile = subSys.getRemoteFileObject(_store.getAbsolutePath(), monitor);
} }
catch (SystemMessageException e) { catch (SystemMessageException e) {
throw new CoreException(new Status( rethrowCoreException(e, EFS.ERROR_READ);
IStatus.ERROR,
Activator.getDefault().getBundle().getSymbolicName(),
getExceptionMessage(null, e), e));
} }
} }
@ -328,7 +323,8 @@ public class RSEFileStoreImpl extends FileStore
if (forceExists && (remoteFile == null || !remoteFile.exists())) { if (forceExists && (remoteFile == null || !remoteFile.exists())) {
throw new CoreException(new Status(IStatus.ERROR, throw new CoreException(new Status(IStatus.ERROR,
Activator.getDefault().getBundle().getSymbolicName(), Activator.getDefault().getBundle().getSymbolicName(),
Messages.FILE_STORE_DOES_NOT_EXIST)); EFS.ERROR_NO_LOCATION,
Messages.FILE_STORE_DOES_NOT_EXIST, null));
} }
return remoteFile; return remoteFile;
} }
@ -636,13 +632,13 @@ public class RSEFileStoreImpl extends FileStore
*/ */
public IFileStore mkdir(int options, IProgressMonitor monitor) throws CoreException public IFileStore mkdir(int options, IProgressMonitor monitor) throws CoreException
{ {
//TODO Check should be done by IRemoteFileSubSystem.createFolders() //TODO bug 234026: Check should be done by IRemoteFileSubSystem.createFolders()
//if ((options & EFS.SHALLOW)!=0) { if ((options & EFS.SHALLOW) == 0) {
// IFileStore parent = getParent(); IFileStore parent = getParent();
// if (parent == null) || !parent.{ if (parent != null) {
// parent.mkdir(options, monitor); parent.mkdir(options, monitor);
// } }
//} }
cacheRemoteFile(null); cacheRemoteFile(null);
IRemoteFile remoteFile = getRemoteFileObject(monitor, false); IRemoteFile remoteFile = getRemoteFileObject(monitor, false);