Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore old exception handling for #2738

Merged
merged 1 commit into from
Jul 12, 2023
Merged

Conversation

cdietrich
Copy link
Member

Restore old exception handling for

@cdietrich cdietrich added this to the Release_2.32 milestone Jul 11, 2023
@cdietrich cdietrich requested a review from szarnekow July 11, 2023 14:20
} catch (Throwable e) {
throw new RuntimeException(e);
} catch (CoreException e) {
Exceptions.sneakyThrow(e);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

excedption handling is still bogus in
org.eclipse.xtext.builder.builderState.MarkerUpdaterImpl.processDelta(Delta, ResourceSet, IProgressMonitor)
case where delete markers is dirctly called. wonder if we should catch and log there too

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@szarnekow could you please have a look?

Copy link
Member Author

@cdietrich cdietrich Jul 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wonder how to run in the delta.getNew() == case? uninstalling the language? but how get we the contributor then?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bildschirmfoto 2023-07-11 um 17 19 25 exception will fall though, be caught and rethrown here and finally handled here Bildschirmfoto 2023-07-11 um 17 21 04 this makes limited sense to me. @szarnekow what do you think?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other code like
org.eclipse.xtext.ui.validation.MarkerEraser.deleteValidationMarkers(IFile, CheckMode, IProgressMonitor)
org.eclipse.xtext.ui.validation.MarkerEraser.deleteValidationMarkers(IFile, CheckMode, IProgressMonitor)
directly catch and log
=> propose to change to

@Override
	public void deleteMarkers(IFile file, IProgressMonitor monitor) {
		try {
			file.deleteMarkers(TaskMarkerTypeProvider.XTEXT_TASK_TYPE, true, IResource.DEPTH_ZERO);
		} catch (CoreException e) {
			LOG.error(e.getMessage(), e);
		}
	}
	```

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. We shouldn't fail miserably because some marker wasn't created

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx. updated the pr

Signed-off-by: Christian Dietrich
<chriTaskMarkerContributorstian.dietrich@itemis.de>
@cdietrich cdietrich merged commit c32a3be into main Jul 12, 2023
5 checks passed
@cdietrich cdietrich deleted the cd_restore_deleteMarkers branch July 12, 2023 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants