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: 28
Registered: April 2019
Junior Member
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: 13931
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: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Join two scopes
Next Topic:Add tag/separator/... to organise outline view
Goto Forum:
  


Current Time: Tue May 11 13:17:02 GMT 2021

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

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

Back to the top