Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to cleanly handle runtime exceptions in AbstractModelInferrer
How to cleanly handle runtime exceptions in AbstractModelInferrer [message #1835496] Fri, 04 December 2020 19:29 Go to next message
Ben Holland is currently offline Ben HollandFriend
Messages: 34
Registered: April 2019
So I know about the XbaseValidator and that I can create error/warning checks, but can I also handle errors from the infer method of an AbstractModelInferrer? Say I have a runtime exception during code generation, is there a way I can handle the exception and cleanly report it as an error on a particular EObject or do I have to check for that condition in the validator separately? I noticed that a runtime exception in the infer method usually just puts an error on line 0 of the source file with the exception message.

Thank you all for you continued advice and help on this forum!
Re: How to cleanly handle runtime exceptions in AbstractModelInferrer [message #1835499 is a reply to message #1835496] Fri, 04 December 2020 20:11 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14491
Registered: July 2009
Senior Member
hi, i am not aware of such a thing. but as such a exception would be a programming error on your side, i have doubts an end use would be able to deal with an EObject specific error

Need professional support for Xtext, Xpand, EMF?
Go to:
Twitter : @chrdietrich
Blog :
Previous Topic:Add tag/separator/... to organise outline view
Next Topic:New Xtext project from ECore - Packaging error
Goto Forum:

Current Time: Sun May 28 12:49:32 GMT 2023

Powered by FUDForum. Page generated in 0.01540 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top