Hi,
I'm sending the exceptions of my plugin to the Error Log. This is an example built from the "Hello World" sample puging project:
@SuppressWarnings("null")
public void run(IAction action) {
MessageDialog.openInformation(
window.getShell(),
"Test",
"Hello, Eclipse world");
Bundle bundle = Platform.getBundle(Platform.PI_RUNTIME);
ILog log = Platform.getLog(bundle);
Object o = null;
try {
o.equals("sk");
} catch (Exception e) {
log.log(new Status(Status.ERROR, "MyPI", "test", e));
}
}
Everything works fine, but the exception keeps showing up in the Eclipse console:
!ENTRY MyPI 4 0 2011-11-11 15:36:23.116
!MESSAGE test
!STACK 0
java.lang.NullPointerException
at test.actions.SampleAction.run(SampleAction.java:50)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
...
I was hoping to not see the exception written in the console anymore.
Is this how it is supposed to work or I am doing something wrong?
Thanks!