Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2014-04-15 18:31:18 -0400
committerslewis2014-04-15 18:31:18 -0400
commit85a3ce52f594d995fc2675098be064bf7ef3a563 (patch)
tree0acd8e50aa0db1ad37011b53b540399eceaad579 /framework/bundles/org.eclipse.ecf.identity/src
parent5a724f19ae4dca2a909064ec5abfd64338d853fa (diff)
downloadorg.eclipse.ecf-85a3ce52f594d995fc2675098be064bf7ef3a563.tar.gz
org.eclipse.ecf-85a3ce52f594d995fc2675098be064bf7ef3a563.tar.xz
org.eclipse.ecf-85a3ce52f594d995fc2675098be064bf7ef3a563.zip
Fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=432868
Diffstat (limited to 'framework/bundles/org.eclipse.ecf.identity/src')
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/ECFException.java8
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/ECFRuntimeException.java23
2 files changed, 17 insertions, 14 deletions
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/ECFException.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/ECFException.java
index 74550a2b4..89f0acce0 100644
--- a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/ECFException.java
+++ b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/ECFException.java
@@ -8,9 +8,7 @@
******************************************************************************/
package org.eclipse.ecf.core.util;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.*;
import org.eclipse.ecf.internal.core.identity.Activator;
public class ECFException extends CoreException {
@@ -41,7 +39,8 @@ public class ECFException extends CoreException {
* @param cause
*/
public ECFException(String message, Throwable cause) {
- this(new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0, ((message == null) ? "" : message), cause)); //$NON-NLS-1$
+ this(new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0,
+ ((message == null) ? "" : message), cause)); //$NON-NLS-1$
}
/**
@@ -50,5 +49,6 @@ public class ECFException extends CoreException {
*/
public ECFException(IStatus status) {
super(status);
+ initCause(status.getException());
}
} \ No newline at end of file
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/ECFRuntimeException.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/ECFRuntimeException.java
index d96550d1d..6ef0a7e6d 100644
--- a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/ECFRuntimeException.java
+++ b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/ECFRuntimeException.java
@@ -49,29 +49,32 @@ public class ECFRuntimeException extends RuntimeException {
* @param cause
*/
public ECFRuntimeException(String message, Throwable cause) {
- this(new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0, ((message == null) ? "" : message), cause)); //$NON-NLS-1$
+ this(new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0,
+ ((message == null) ? "" : message), cause)); //$NON-NLS-1$
}
/**
- * Creates a new exception with the given status object. The message
- * of the given status is used as the exception message.
+ * Creates a new exception with the given status object. The message of the
+ * given status is used as the exception message.
*
- * @param status the status object to be associated with this exception
+ * @param status
+ * the status object to be associated with this exception
*/
public ECFRuntimeException(IStatus status) {
super(status.getMessage());
+ initCause(status.getException());
this.status = status;
}
/**
* Returns the status object for this exception.
* <p>
- * <b>IMPORTANT:</b><br>
- * The result must NOT be used to log a <code>CoreException</code>
- * (e.g., using <code>yourPlugin.getLog().log(status);</code>),
- * since that code pattern hides the original stacktrace.
- * Instead, create a new {@link Status} with your plug-in ID and
- * this <code>CoreException</code>, and log that new status.
+ * <b>IMPORTANT:</b><br>
+ * The result must NOT be used to log a <code>CoreException</code> (e.g.,
+ * using <code>yourPlugin.getLog().log(status);</code>), since that code
+ * pattern hides the original stacktrace. Instead, create a new
+ * {@link Status} with your plug-in ID and this <code>CoreException</code>,
+ * and log that new status.
* </p>
*
* @return a status object

Back to the top