Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Reporting errors during transformation
Reporting errors during transformation [message #1755841] Wed, 08 March 2017 14:26 Go to next message
Lutz Wrage is currently offline Lutz WrageFriend
Messages: 122
Registered: July 2009
Senior Member
I have an ATL transformation that handles a subset of all possible input models. Currently, if the input model contains some construct that my transformation does not handle, the transformation crashes and I get a stack trace.
I want to add some error reporting to my transformation. One way I can think of is to define an additional metamodel for errors and warnings and fill that during the transformation. Is there a simpler way? Any examples?

Thanks.
Re: Reporting errors during transformation [message #1755963 is a reply to message #1755841] Thu, 09 March 2017 15:23 Go to previous messageGo to next message
louis andia. is currently offline louis andia.Friend
Messages: 46
Registered: November 2016
Member
You can use the debug() method to fill your console and avoid crashes.
For example :
if caseNotHandleYet
then OclUndefined.debug('ERROR: ...')
Re: Reporting errors during transformation [message #1755997 is a reply to message #1755963] Thu, 09 March 2017 20:50 Go to previous message
Lutz Wrage is currently offline Lutz WrageFriend
Messages: 122
Registered: July 2009
Senior Member
Unfortunately that doesn't work in my case. The transformation is invoked from Java code in a plugin, so there is no console.
Previous Topic:How to check name attribute that contains two words
Next Topic:empty sequence problem
Goto Forum:
  


Current Time: Mon Nov 20 19:13:34 GMT 2017

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

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