Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 211130

Summary: [Markers] Marker#checkInfo need to include a stack trace
Product: [Eclipse Project] Platform Reporter: Tod Creasey <Tod_Creasey>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: RESOLVED WONTFIX QA Contact: Hitesh <hsoliwal>
Severity: minor    
Priority: P3 CC: bokowski, john.arthorne
Version: 3.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Tod Creasey CLA 2007-11-27 16:32:40 EST
When the info for a marker is null the log will get a message like
!ENTRY org.eclipse.core.resources 4 376 2007-11-27 14:27:45.919
!MESSAGE Marker id 7208 not found.

but this has no context as to how it happened so debugging what caused it is almost impossible.
Comment 1 John Arthorne CLA 2007-11-27 17:57:38 EST
Marker.checkInfo doesn't log anything, it just throws an exception. This is a case of a client catching the CoreException thrown by resource API, and then logging CoreException.getStatus() and throwing the exception away.
Comment 2 Tod Creasey CLA 2007-11-28 07:45:38 EST
Thanks John - I discovered that later and should have added something myself. I can add my own stack trace but it seemed to be something that would be useful for people who were logging the exception.
Comment 3 John Arthorne CLA 2007-11-28 09:21:05 EST
It looks like these log entries are coming from:

org.eclipse.ui.internal.provisional.views.markers.MarkerEntry

There are several places where it does this after calling IMarker API:

} catch (CoreException e) {
	StatusManager.getManager().handle(e.getStatus());
}

Since you are logging only the status and discarding the exception object, you are throwing away the stack trace.
Comment 4 John Arthorne CLA 2007-11-28 09:28:28 EST
Same problem in MarkersPropertyPage.

You probably don't even need to be logging these exceptions - it just means the marker no longer exists (for example perhaps a build was running in the background and removed it).
Comment 5 Tod Creasey CLA 2007-11-28 09:45:18 EST
I am only logging these in debug mode now
Comment 6 Susan McCourt CLA 2009-07-09 19:19:22 EDT
As per http://wiki.eclipse.org/Platform_UI/Bug_Triage_Change_2009
Comment 7 John Arthorne CLA 2009-07-09 22:50:12 EDT
I don't think this is a problem now that the exception is only logged when a particular debug option is enabled. Ordinary users won't be bothered by this.