Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2002-03-06 19:38:25 +0000
committerJean Michel-Lemieux2002-03-06 19:38:25 +0000
commit8d097d790e4f15f4f7b82069754b442294e01e08 (patch)
tree17ff535afa67ec4146cd3137cc1284cffe13f0dd /bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSException.java
parenta615398377adec55eb8c308b3056c3a2013c7fee (diff)
downloadeclipse.platform.team-8d097d790e4f15f4f7b82069754b442294e01e08.tar.gz
eclipse.platform.team-8d097d790e4f15f4f7b82069754b442294e01e08.tar.xz
eclipse.platform.team-8d097d790e4f15f4f7b82069754b442294e01e08.zip
IResource support in CVS.
- new cvs synchronizer based on the Eclipse sync info support - performance improvements for batching of cvs operations
Diffstat (limited to 'bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSException.java')
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSException.java102
1 files changed, 29 insertions, 73 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSException.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSException.java
index a63157e39..ea37f7bcb 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSException.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSException.java
@@ -13,114 +13,70 @@ import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.team.ccvs.core.CVSProviderPlugin;
+import org.eclipse.team.ccvs.core.CVSStatus;
import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.connection.ResourceStatus;
/**
- * This is an exception that is thrown by the cvs-adaptor
- * for vcm
- *
- * @see CoreExcpetion
+ * A checked expection representing a failure in the CVS plugin.
+ * <p>
+ * CVS exceptions contain a status object describing the cause of
+ * the exception.
+ * </p>
+ *
+ * @see IStatus
*/
-
public class CVSException extends TeamException {
-
- public CVSException(
- int severity,
- int code,
- IPath path,
- String message,
- Throwable exception) {
- super(new ResourceStatus(severity, code, path, message, exception));
- }
- public CVSException(
- int severity,
- int code,
- IPath path,
- String message) {
- this(severity, code, path, message, null);
- }
- public CVSException(
- int severity,
- int code,
- IPath path,
- Throwable exception) {
- this(severity, code, path, null, exception);
- }
- public CVSException(
- int severity,
- int code,
- String message,
- Exception e) {
- super(new Status(severity, CVSProviderPlugin.ID, code, message, null));
+
+ /*
+ * Helpers for creating CVS exceptions
+ */
+ public CVSException(int severity, int code, String message, Exception e) {
+ super(new CVSStatus(severity, code, message, null));
}
- public CVSException(
- int severity,
- int code,
- String message) {
+
+ public CVSException(int severity, int code, String message) {
this(severity, code, message, null);
}
- public CVSException(
- int severity,
- int code,
- Exception e) {
- super(new Status(severity, CVSProviderPlugin.ID, code, null, e));
-
- }
-
public CVSException(String message) {
- super(new Status(IStatus.ERROR, CVSProviderPlugin.ID, UNABLE, message, null));
+ super(new CVSStatus(IStatus.ERROR, UNABLE, message, null));
}
- public CVSException(String message, IPath path) {
- this(message, path, null);
- }
-
public CVSException(String message, Exception e) {
this(IStatus.ERROR, UNABLE, message, e);
}
public CVSException(String message, IPath path, Throwable throwable) {
- this(new ResourceStatus(IStatus.ERROR, path, message, throwable));
+ this(new CVSStatus(IStatus.ERROR, path, message, throwable));
}
+
public CVSException(IStatus status) {
super(status);
}
-
+
/*
* Static helper methods for creating exceptions
*/
- public static CVSException wrapException(IResource resource, String message,IOException e) {
+ public static CVSException wrapException(
+ IResource resource,
+ String message,
+ IOException e) {
// NOTE: we should record the resource somehow
// We should also inlcude the IO message
- return new CVSException(new Status(
- IStatus.ERROR,
- CVSProviderPlugin.ID,
- IO_FAILED,
- message,
- e));
+ return new CVSException(new CVSStatus(IStatus.ERROR, IO_FAILED, message, e));
}
+
/*
* Static helper methods for creating exceptions
*/
public static CVSException wrapException(IResource resource, String message, CoreException e) {
- return new CVSException(new Status(
- IStatus.ERROR,
- CVSProviderPlugin.ID,
- UNABLE,
- message,
- e));
+ return new CVSException(new CVSStatus(IStatus.ERROR, UNABLE, message, e));
}
+
/*
* Static helper methods for creating exceptions
*/
public static CVSException wrapException(Exception e) {
- return new CVSException(new Status(
- IStatus.ERROR,
- CVSProviderPlugin.ID,
- UNABLE,
- e.getMessage() != null ? e.getMessage() : "", //$NON-NLS-1$
- e));
+ return new CVSException(new CVSStatus(IStatus.ERROR, UNABLE, e.getMessage() != null ? e.getMessage() : "", e)); //$NON-NLS-1$
}
} \ No newline at end of file

Back to the top