mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-16 21:45:22 +02:00
[216252] leave exception processing to SimpleSystemMessage
This commit is contained in:
parent
510dd3e4f5
commit
88a6b40fb1
1 changed files with 2 additions and 9 deletions
|
@ -18,8 +18,6 @@
|
||||||
|
|
||||||
package org.eclipse.rse.connectorservice.dstore.util;
|
package org.eclipse.rse.connectorservice.dstore.util;
|
||||||
|
|
||||||
import java.io.PrintWriter;
|
|
||||||
import java.io.StringWriter;
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
|
@ -258,14 +256,9 @@ public class ConnectionStatusListener implements IDomainListener, IRunnableWithP
|
||||||
{
|
{
|
||||||
String dfailedMsg = NLS.bind(ConnectorServiceResources.MSG_DISCONNECT_FAILED, hostName);
|
String dfailedMsg = NLS.bind(ConnectorServiceResources.MSG_DISCONNECT_FAILED, hostName);
|
||||||
|
|
||||||
StringWriter excWriter = new StringWriter();
|
|
||||||
exc.printStackTrace(new PrintWriter(excWriter));
|
|
||||||
String dmsg = exc.toString();
|
|
||||||
if ((dmsg == null) || (exc instanceof ClassCastException)) dmsg = exc.getClass().getName();
|
|
||||||
String details = dmsg + "\n" + excWriter.toString(); //$NON-NLS-1$
|
|
||||||
|
|
||||||
try{
|
try{
|
||||||
SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, dfailedMsg, details);
|
SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, dfailedMsg, exc);
|
||||||
|
|
||||||
SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
|
SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
|
||||||
msgDlg.setException(exc);
|
msgDlg.setException(exc);
|
||||||
|
|
Loading…
Add table
Reference in a new issue