mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +02:00
log error messagen on extension loading
This commit is contained in:
parent
e059ef7a3b
commit
d78bc8b97e
2 changed files with 12 additions and 4 deletions
|
@ -15,7 +15,10 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import org.eclipse.core.runtime.IConfigurationElement;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.RegistryFactory;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.tm.terminal.internal.control.TerminalPlugin;
|
||||
|
||||
/**
|
||||
* A factory to get {@link ITerminalConnector} instances.
|
||||
|
@ -38,11 +41,16 @@ public class TerminalConnectorExtension {
|
|||
if(conn.isInstalled())
|
||||
result.add(conn);
|
||||
}
|
||||
} catch (NoClassDefFoundError e) {
|
||||
log(e);
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
log(e);
|
||||
}
|
||||
}
|
||||
return (ITerminalConnector[]) result.toArray(new ITerminalConnector[result.size()]);
|
||||
}
|
||||
|
||||
private static void log(Throwable e) {
|
||||
TerminalPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, TerminalPlugin.PLUGIN_ID, IStatus.OK, e.getMessage(), e));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@ import org.eclipse.ui.plugin.AbstractUIPlugin;
|
|||
|
||||
public class TerminalPlugin extends AbstractUIPlugin {
|
||||
protected static TerminalPlugin fDefault;
|
||||
public static final String PLUGIN_HOME = "org.eclipse.tm.terminal"; //$NON-NLS-1$
|
||||
public static final String HELP_VIEW = PLUGIN_HOME + ".terminal_view"; //$NON-NLS-1$
|
||||
public static final String PLUGIN_ID = "org.eclipse.tm.terminal"; //$NON-NLS-1$
|
||||
public static final String HELP_VIEW = PLUGIN_ID + ".terminal_view"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* The constructor.
|
||||
|
|
Loading…
Add table
Reference in a new issue