diff options
author | slewis | 2014-04-15 22:31:18 +0000 |
---|---|---|
committer | slewis | 2014-04-15 22:31:18 +0000 |
commit | 85a3ce52f594d995fc2675098be064bf7ef3a563 (patch) | |
tree | 0acd8e50aa0db1ad37011b53b540399eceaad579 | |
parent | 5a724f19ae4dca2a909064ec5abfd64338d853fa (diff) | |
download | org.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
Change-Id: I7658f51df8912540ade85bcdef6abe60ab6b05fd
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 |